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:09:26 +0300
committerGitHub <noreply@github.com>2022-06-10 12:09:26 +0300
commit3a3c3b5e1d25a07412203e897b7ec2e78b41982b (patch)
tree4c5deb17d32bb0fdf6e82abf79be8f54762e8907
parenta71b23f9bc89334fcbbae58941e463a2915ecba5 (diff)
parent109bbf31db30985ea081a8e628da19afc8be7c8d (diff)
Merge pull request #32710 from nextcloud/backport/32662/stable24
[stable24] Cleanup temporary files after finishing the write to object storage
-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;