Skip to content

Commit

Permalink
delete files before cleaning cache when cleaning user files
Browse files Browse the repository at this point in the history
otherwise, when using object store, we loose track of which files the user owns before we can delete them

Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Jan 6, 2022
1 parent e231338 commit 83d73b5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,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 83d73b5

Please sign in to comment.