From 59e60a0756dacb2efe629647fff9e6d9ef5eddc6 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 9cf154e9bf..4ac597717e 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; }