diff --git a/module/backup/control.php b/module/backup/control.php index d3fb75f8a4..67d58a26db 100644 --- a/module/backup/control.php +++ b/module/backup/control.php @@ -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()); } /** diff --git a/module/backup/model.php b/module/backup/model.php index b42b44a75e..9cabd4e649 100644 --- a/module/backup/model.php +++ b/module/backup/model.php @@ -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), '/') . '/'; } /**