aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-05-26 01:12:34 +0200
committerGitHub <noreply@github.com>2023-05-26 01:12:34 +0200
commitf29aa2997eece89b18e06cdaf192fe5be3b0acaf (patch)
treedeec20eada17d428987c91d309d5afa32ef27319
parent477d6444b864596fea8507399cda703d0339f7b9 (diff)
parent6b55e92e33d698484952f7964c7f4d909e8fd3e6 (diff)
downloadnextcloud-server-f29aa2997eece89b18e06cdaf192fe5be3b0acaf.tar.gz
nextcloud-server-f29aa2997eece89b18e06cdaf192fe5be3b0acaf.zip
Merge pull request #38429 from tanganellilore/fix_delete_user_syslink
Fix deletion of User when system link are used in him user folder
-rw-r--r--lib/private/Files/Storage/Local.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 3b292506578..c0ce0e7021a 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -136,10 +136,10 @@ class Local extends \OC\Files\Storage\Common {
if (in_array($file->getBasename(), ['.', '..'])) {
$it->next();
continue;
- } elseif ($file->isDir()) {
- rmdir($file->getPathname());
} elseif ($file->isFile() || $file->isLink()) {
unlink($file->getPathname());
+ } elseif ($file->isDir()) {
+ rmdir($file->getPathname());
}
$it->next();
}