Merge pull request #24484 from nextcloud/backport/24094/stable19

[stable19] Only attempt to move to trash if a file is not in appdata
This commit is contained in:
Morris Jobke 2020-12-01 23:03:18 +01:00 committed by GitHub
commit e4bccaf624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}