summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib/Command
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-11-22 10:22:00 +0100
committerMorris Jobke <hey@morrisjobke.de>2017-03-10 15:58:44 -0600
commit5dbb32fb81e5e11c5ba4386ec54457da4483f86e (patch)
tree3b15fca59b0b661dd7eba8ca98fcf88d45178b4d /apps/files_versions/lib/Command
parenta10476a3c6409d97b49e1c55210d6b25044f08d7 (diff)
downloadnextcloud-server-5dbb32fb81e5e11c5ba4386ec54457da4483f86e.tar.gz
nextcloud-server-5dbb32fb81e5e11c5ba4386ec54457da4483f86e.zip
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 <lukas@statuscode.ch>
Diffstat (limited to 'apps/files_versions/lib/Command')
-rw-r--r--apps/files_versions/lib/Command/Expire.php4
1 files changed, 1 insertions, 3 deletions
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);
}
}