Skip to content

Commit

Permalink
fix: also cleanup file cache on failed uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Aug 2, 2023
1 parent 9f3069a commit c2e062f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/dav/lib/Connector/Sabre/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,11 @@ private function cleanFailedUpload(Storage $partStorage, $internalPartPath): voi
if (class_exists(\OCA\Files_Trashbin\Storage::class)) {
\OCA\Files_Trashbin\Storage::$disableTrash = true;
}
# delete file from storage
$partStorage->unlink($internalPartPath);
# delete file from cache
$partStorage->getCache()->remove($internalPartPath);

} finally {
if (class_exists(\OCA\Files_Trashbin\Storage::class)) {
\OCA\Files_Trashbin\Storage::$disableTrash = false;
Expand Down

0 comments on commit c2e062f

Please sign in to comment.