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:
authorJulius Härtl <jus@bitgrid.net>2022-05-30 18:53:07 +0300
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-06-02 19:31:26 +0300
commit9b914f02b1f22b483866f05e22fdb29985ea4897 (patch)
tree832188bd060c034991aea6d04c38e18301cb1b8a
parente2a6c9b0d3069938ddae84fa0b3f1b305d65a5e6 (diff)
Cleanup temporary files after finishing the write to object storagebackport/32662/stable23
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-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;