summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-07-01 17:45:01 +0200
committerRobin Appelman <icewind@owncloud.com>2014-05-28 18:16:23 +0200
commit38c1da09768d034ee788f0c6a4284591e914fe4a (patch)
tree5312ae50b7f9299c6a9c54b0aaac774d52a892a2 /lib
parente83b41493fe28eca612f3993a5a1cc3e44e9c145 (diff)
downloadnextcloud-server-38c1da09768d034ee788f0c6a4284591e914fe4a.tar.gz
nextcloud-server-38c1da09768d034ee788f0c6a4284591e914fe4a.zip
fix recursive rename for local storage backend
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/storage/local.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index aaa9f3c858e..ec28ebac6ee 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -177,9 +177,11 @@ if (\OC_Util::runningOnWindows()) {
return false;
}
- if ($return = rename($this->datadir . $path1, $this->datadir . $path2)) {
+ if ($this->is_dir($path2)) {
+ $this->rmdir($path2);
}
- return $return;
+
+ return rename($this->datadir . $path1, $this->datadir . $path2);
}
public function copy($path1, $path2) {