delete files before cleaning cache when cleaning user files

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>
This commit is contained in:
Robin Appelman 2022-01-06 15:12:56 +01:00 committed by Vincent Petry (Rebase PR Action)
parent 12e3e85336
commit db3093a46f

View file

@ -72,12 +72,12 @@ class UserDeletedFilesCleanupListener implements IEventListener {
}
$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('');
}
}
}