mirror of https://github.com/nextcloud/server
files: remove destination file before copying new content (WORM)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
This commit is contained in:
parent
b6065a236f
commit
8fc4cf67f1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue