From 5dbb32fb81e5e11c5ba4386ec54457da4483f86e Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 22 Nov 2016 10:22:00 +0100 Subject: Properly expire ext storage versions (#26601) * Properly expire ext storage versions System-wide external storages have no real owner so the current user is used as owner. However when running cron.php there is no current user, so no expiry can be done. This fix adds an user argument to the expire() function to tell for which user to expire files. This information is anyway always available now through the expire command job. * Move version expire setupFS into the expire function * Add comment about not tearing down in version Storage::expire() Signed-off-by: Lukas Reschke --- apps/files_versions/lib/Command/Expire.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'apps/files_versions/lib/Command') diff --git a/apps/files_versions/lib/Command/Expire.php b/apps/files_versions/lib/Command/Expire.php index fecffd2f3cc..794cedbac9a 100644 --- a/apps/files_versions/lib/Command/Expire.php +++ b/apps/files_versions/lib/Command/Expire.php @@ -58,8 +58,6 @@ class Expire implements ICommand { return; } - \OC_Util::setupFS($this->user); - Storage::expire($this->fileName); - \OC_Util::tearDownFS(); + Storage::expire($this->fileName, $this->user); } } -- cgit v1.2.3