diff options
Diffstat (limited to 'apps/files/lib/app.php')
-rw-r--r-- | apps/files/lib/app.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files/lib/app.php b/apps/files/lib/app.php index 1ac266073db..fea88faa92a 100644 --- a/apps/files/lib/app.php +++ b/apps/files/lib/app.php @@ -59,6 +59,13 @@ class App { $result['data'] = array( 'message' => $this->l10n->t("Invalid folder name. Usage of 'Shared' is reserved.") ); + // rename to non-existing folder is denied + } else if (!$this->view->file_exists($dir)) { + $result['data'] = array('message' => (string)$this->l10n->t( + 'The target folder has been moved or deleted.', + array($dir)), + 'code' => 'targetnotfound' + ); // rename to existing file is denied } else if ($this->view->file_exists($dir . '/' . $newname)) { |