diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-01-22 17:17:58 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-01-29 12:46:11 +0100 |
commit | 58c7042e708172b8e2fe252fc53abe87bcf8c1f1 (patch) | |
tree | 891abca5d6cf02a504fda3082203aa8a8cb3d53d /apps/files/lib | |
parent | a2b79ead2dad807779c51a32cf880fe0bd33d3bc (diff) | |
download | nextcloud-server-58c7042e708172b8e2fe252fc53abe87bcf8c1f1.tar.gz nextcloud-server-58c7042e708172b8e2fe252fc53abe87bcf8c1f1.zip |
Added error message for when target folder was removed
Whent trying to upload/rename/create files in a folder that was removed
or rename, the correct error message is now shown.
In the case of upload of multiple files, the upload is cancelled.
This situation can happen if the target folder was renamed or removed
from another browser window or client.
Diffstat (limited to 'apps/files/lib')
-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)) { |