diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2022-10-01 17:01:28 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-10-01 17:29:44 +0000 |
commit | 61def5e276ad98d66f7ce43331924615c2b4452f (patch) | |
tree | beaea039ddba652a03dc8923b4ee448aa8e350d0 /core | |
parent | ffecfc644186c2bcf88f2e805a8531f8dd4a8ac0 (diff) | |
download | nextcloud-server-61def5e276ad98d66f7ce43331924615c2b4452f.tar.gz nextcloud-server-61def5e276ad98d66f7ce43331924615c2b4452f.zip |
also use updatedir for cleanup of backups
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'core')
-rw-r--r-- | core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php index 7ab9fb47d54..df5d8de8eb7 100644 --- a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php +++ b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php @@ -45,14 +45,14 @@ class BackgroundCleanupUpdaterBackupsJob extends QueuedJob { * This job cleans up all backups except the latest 3 from the updaters backup directory */ public function run($arguments) { - $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); + $updateDir = $this->config->getSystemValue('updatedirectory', null) ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); $instanceId = $this->config->getSystemValue('instanceid', null); if (!is_string($instanceId) || empty($instanceId)) { return; } - $updaterFolderPath = $dataDir . '/updater-' . $instanceId; + $updaterFolderPath = $updateDir . '/updater-' . $instanceId; $backupFolderPath = $updaterFolderPath . '/backups'; if (file_exists($backupFolderPath)) { $this->log->info("$backupFolderPath exists - start to clean it up"); |