* adjust for backup.

This commit is contained in:
wangyidong
2019-01-28 10:03:32 +08:00
parent 8f1c20d5ed
commit 97659beb32
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -30,6 +30,7 @@ class backup extends control
{
if(!is_writable($this->backupPath)) $this->view->error = sprintf($this->lang->backup->error->noWritable, $this->backupPath);
}
if(!is_writable($this->app->getTmpRoot())) $this->view->error = sprintf($this->lang->backup->error->noWritable, $this->app->getTmpRoot());
}
/**
+2 -1
View File
@@ -283,7 +283,8 @@ class backupModel extends model
*/
public function getBackupPath()
{
return empty($this->config->backup->settingDir) ? $this->app->getTmpRoot() . 'backup' . DS : $this->config->backup->settingDir;
$backupPath = empty($this->config->backup->settingDir) ? $this->app->getTmpRoot() . 'backup' . DS : $this->config->backup->settingDir;
return trim(str_replace('\\', '/', $backupPath), '/') . '/';
}
/**