This commit is contained in:
Julius Härtl 2021-06-02 17:51:04 +02:00 committed by GitHub
commit 493e70c213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -319,6 +319,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
}
// we reached the end when the list is no longer truncated
} while ($objects['IsTruncated']);
$this->deleteObject($path);
} catch (S3Exception $e) {
\OC::$server->getLogger()->logException($e, ['app' => 'files_external']);
return false;

View File

@ -612,6 +612,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
$dh = $sourceStorage->opendir($sourceInternalPath);
$result = $this->mkdir($targetInternalPath);
if (is_resource($dh)) {
$result = true;
while ($result and ($file = readdir($dh)) !== false) {
if (!Filesystem::isIgnoredDir($file)) {
$result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file);