diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-10-01 22:33:58 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-10-01 22:33:58 +0200 |
commit | de43515cfad858224393f5cc5bfb35c07a1820b0 (patch) | |
tree | 0da6db5f76df0886205d68c0f7a4b80d2f832c17 | |
parent | 29deef38b27f2b33eec8925cab7f6f323a35ea96 (diff) | |
download | nextcloud-server-de43515cfad858224393f5cc5bfb35c07a1820b0.tar.gz nextcloud-server-de43515cfad858224393f5cc5bfb35c07a1820b0.zip |
fix recursive delete for smb
-rw-r--r-- | apps/files_external/lib/streamwrapper.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php index a110c006529..4a63dfb6e02 100644 --- a/apps/files_external/lib/streamwrapper.php +++ b/apps/files_external/lib/streamwrapper.php @@ -17,6 +17,14 @@ abstract class StreamWrapper extends Common { public function rmdir($path) { if ($this->file_exists($path)) { + $dh = $this->opendir($path); + while (($file = readdir($dh)) !== false) { + if ($this->is_dir($path . '/' . $file)) { + $this->rmdir($path . '/' . $file); + } else { + $this->unlink($path . '/' . $file); + } + } $success = rmdir($this->constructUrl($path)); clearstatcache(); return $success; |