diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-05-30 17:53:07 +0200 |
---|---|---|
committer | Julius Härtl (Rebase PR Action) <github@juliushaertl.de> | 2022-06-02 12:57:18 +0000 |
commit | 0f0e74a78c2e0aab4723528977cadbe9149ee373 (patch) | |
tree | 1f116b4d1182465a9870da4af35de6a9e8ccf4dc | |
parent | ca45e6a0640cc1bc758da38629d6f5741df511de (diff) | |
download | nextcloud-server-0f0e74a78c2e0aab4723528977cadbe9149ee373.tar.gz nextcloud-server-0f0e74a78c2e0aab4723528977cadbe9149ee373.zip |
Cleanup temporary files after finishing the write to object storage
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-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; |