Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-06-10 12:10:21 +0300
committerGitHub <noreply@github.com>2022-06-10 12:10:21 +0300
commit3d890eaea2b45f883237a7e1ed521f13cd1923f7 (patch)
tree2fac41017a105abf9a338adb2e33b95ea895c9c3 /lib/private
parentc7d3f149d26751dcde6b754cadf228591a1390c4 (diff)
parenta626becd9bd380610b873b24d8d2ce230c50cfd4 (diff)
Merge pull request #32712 from nextcloud/backport/32662/stable22
[stable22] Cleanup temporary files after finishing the write to object storage
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php2
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;