From 7d786a4e37b540474c429fd31913e6ac0235d7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 13 Nov 2020 08:30:35 +0100 Subject: [PATCH] Only attempt to move to trash if a file is not in appdata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_trashbin/lib/Storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_trashbin/lib/Storage.php b/apps/files_trashbin/lib/Storage.php index 2064b7d664..806ce21877 100644 --- a/apps/files_trashbin/lib/Storage.php +++ b/apps/files_trashbin/lib/Storage.php @@ -128,7 +128,7 @@ class Storage extends Wrapper { protected function shouldMoveToTrash($path) { $normalized = Filesystem::normalizePath($this->mountPoint . '/' . $path); $parts = explode('/', $normalized); - if (count($parts) < 4) { + if (count($parts) < 4 || strpos($normalized, '/appdata_') === 0) { return false; }