diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-08-08 18:16:01 +0400 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-10-21 18:55:17 +0400 |
commit | 9ea90ac82fcc77b4d0e78cd8d1d86362286091ac (patch) | |
tree | bac8228b7134fa411dc157c41465454b63f676e8 /apps/files | |
parent | e46f87fdacb8273675311a8538fc4b47fdb0ac13 (diff) |
no error if we try to delete a file which no longer exists
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/ajax/delete.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index c69f5a8860c..e2002184b3a 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -17,7 +17,9 @@ $success = true; //Now delete foreach ($files as $file) { - if (($dir === '' && $file === 'Shared') || !\OC\Files\Filesystem::unlink($dir . '/' . $file)) { + if (($dir === '' && $file === 'Shared') || + (\OC\Files\Filesystem::file_exists($dir . '/' . $file) && + !\OC\Files\Filesystem::unlink($dir . '/' . $file))) { $filesWithError .= $file . "\n"; $success = false; } |