diff options
Diffstat (limited to 'lib/private/files/storage/local.php')
-rw-r--r-- | lib/private/files/storage/local.php | 6 |
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) { |