mirror of
https://github.com/nextcloud/server.git
synced 2026-02-11 14:54:02 -05:00
Cleanup temporary files after finishing the write to object storage
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
01ae33f4bb
commit
109bbf31db
1 changed files with 2 additions and 0 deletions
|
|
@ -335,6 +335,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
|
|||
$handle = fopen($tmpFile, $mode);
|
||||
return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) {
|
||||
$this->writeBack($tmpFile, $path);
|
||||
unlink($tmpFile);
|
||||
});
|
||||
case 'a':
|
||||
case 'ab':
|
||||
|
|
@ -352,6 +353,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
|
|||
$handle = fopen($tmpFile, $mode);
|
||||
return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) {
|
||||
$this->writeBack($tmpFile, $path);
|
||||
unlink($tmpFile);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue