Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Local.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 7af512ca3f6..b9dcb7d0537 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -372,6 +372,8 @@ class Local extends \OC\Files\Storage\Common {
return parent::copy($path1, $path2);
} else {
$oldMask = umask($this->defUMask);
+ // support Write-Once-Read-Many filesystems
+ $this->unlink($path2);
$result = copy($this->getSourcePath($path1), $this->getSourcePath($path2));
umask($oldMask);
return $result;