summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-02-09 13:13:39 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-16 13:52:11 +0100
commite98983485f91b5ad57710266a360d6c250b87928 (patch)
tree386f0ef4a2adea635f948e143e3ce0a7b3b353cc /apps/files_external
parente5731b6e1a74fb4518b351e7770202ab9a297892 (diff)
downloadnextcloud-server-e98983485f91b5ad57710266a360d6c250b87928.tar.gz
nextcloud-server-e98983485f91b5ad57710266a360d6c250b87928.zip
handle deleting non existing files
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/smb.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index 34f91defdcc..a6113140198 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -114,13 +114,17 @@ class SMB extends Common {
* @return bool
*/
public function unlink($path) {
- if ($this->is_dir($path)) {
- return $this->rmdir($path);
- } else {
- $path = $this->buildPath($path);
- unset($this->statCache[$path]);
- $this->share->del($path);
- return true;
+ try {
+ if ($this->is_dir($path)) {
+ return $this->rmdir($path);
+ } else {
+ $path = $this->buildPath($path);
+ unset($this->statCache[$path]);
+ $this->share->del($path);
+ return true;
+ }
+ } catch (NotFoundException $e) {
+ return false;
}
}