Skip to content

Commit

Permalink
Only attempt to move to trash if a file is not in appdata
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr authored and MorrisJobke committed Dec 1, 2020
1 parent 6c7b0fa commit 59e60a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_trashbin/lib/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function rmdir($path) {
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;
}

Expand Down

0 comments on commit 59e60a0

Please sign in to comment.