From c2e062fae633f38bbc8c99da93d6b8a42381650d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:02:54 +0200 Subject: [PATCH] fix: also cleanup file cache on failed uploads --- apps/dav/lib/Connector/Sabre/File.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 38a89289c916..900089135eaf 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -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;