Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-12-02 01:03:08 +0300
committerGitHub <noreply@github.com>2020-12-02 01:03:08 +0300
commitd173f306ec9bde808cb0b6837208d98a6d3e6c20 (patch)
tree84cc67612194a0427aa68409b3e5c6b94ad6d2c7
parent5511fb2bf6244d995cee8fa98bf61f5dabe10f0b (diff)
parent6e6d608d3283f96d6c12b466528017da8e52ac91 (diff)
Merge pull request #24485 from nextcloud/backport/24094/stable18
[stable18] Only attempt to move to trash if a file is not in appdata
-rw-r--r--apps/files_trashbin/lib/Storage.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Storage.php b/apps/files_trashbin/lib/Storage.php
index c9f1a928f3b..e9dc4f72f31 100644
--- a/apps/files_trashbin/lib/Storage.php
+++ b/apps/files_trashbin/lib/Storage.php
@@ -129,7 +129,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;
}