Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
files: remove destination file before copying new content (WORM)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
  • Loading branch information
kofemann committed Sep 16, 2022
commit 8fc4cf67f1553d0d37bb061925867789b27579fe
2 changes: 2 additions & 0 deletions lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ public function copy($path1, $path2) {
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;
Expand Down