Skip to content

Commit c2e062f

Browse files
committed
fix: also cleanup file cache on failed uploads
1 parent 9f3069a commit c2e062f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/dav/lib/Connector/Sabre/File.php

+4
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,11 @@ private function cleanFailedUpload(Storage $partStorage, $internalPartPath): voi
738738
if (class_exists(\OCA\Files_Trashbin\Storage::class)) {
739739
\OCA\Files_Trashbin\Storage::$disableTrash = true;
740740
}
741+
# delete file from storage
741742
$partStorage->unlink($internalPartPath);
743+
# delete file from cache
744+
$partStorage->getCache()->remove($internalPartPath);
745+
742746
} finally {
743747
if (class_exists(\OCA\Files_Trashbin\Storage::class)) {
744748
\OCA\Files_Trashbin\Storage::$disableTrash = false;

0 commit comments

Comments
 (0)