Skip to content

Commit

Permalink
Merge pull request #30510 from nextcloud/user-cleanup-storage-before-…
Browse files Browse the repository at this point in the history
…cache

delete files before cleaning cache when cleaning user files
  • Loading branch information
PVince81 authored Jul 26, 2022
2 parents ac4e60e + db3093a commit cb9f342
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ public function handle(Event $event): void {
}
$storage = $this->homeStorageCache[$event->getUser()->getUID()];
$cache = $storage->getCache();
$storage->rmdir('');
if ($cache instanceof Cache) {
$cache->clear();
} else {
throw new \Exception("Home storage has invalid cache");
}
$storage->rmdir('');
}
}
}

0 comments on commit cb9f342

Please sign in to comment.