Browse Source

Merge pull request #32662 from nextcloud/bugfix/noid/cleanup-s3-tmp

Cleanup temporary files after finishing the write to object storage
tags/v25.0.0beta1
Julius Härtl 2 years ago
parent
commit
3f685d5830
No account linked to committer's email address
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      lib/private/Files/ObjectStore/ObjectStoreStorage.php

+ 2
- 0
lib/private/Files/ObjectStore/ObjectStoreStorage.php View File

@@ -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;

Loading…
Cancel
Save