mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #32711 from nextcloud/backport/32662/stable23
[stable23] Cleanup temporary files after finishing the write to object storage
This commit is contained in:
commit
798aad883e
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