diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-05-30 18:53:07 +0300 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-06-02 19:34:27 +0300 |
commit | a626becd9bd380610b873b24d8d2ce230c50cfd4 (patch) | |
tree | 5ee4d02f1c7944bfd08de82ad093e51d4ad48248 /lib/private | |
parent | e15d678bac7ac0178d6b0b3dbf28ebb30c46c457 (diff) |
Cleanup temporary files after finishing the write to object storagebackport/32662/stable22
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/ObjectStore/ObjectStoreStorage.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index adb3928b28a..898f64d97c2 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -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; |