diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-10-01 19:26:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-01 19:26:19 +0200 |
commit | ee67dd82d5f61f2022bc5a7dd57fa41c0df793e1 (patch) | |
tree | 98416c6ec9b0e31339834f94a8e7c6e3679d08d5 | |
parent | f97f13b1367a3919bffd9d1a6aa0f6936540beee (diff) | |
parent | 6ec5c4715c47eeaa73d59e1a3d66184cf6f9ebcc (diff) | |
download | nextcloud-server-ee67dd82d5f61f2022bc5a7dd57fa41c0df793e1.tar.gz nextcloud-server-ee67dd82d5f61f2022bc5a7dd57fa41c0df793e1.zip |
Merge pull request #34364 from nextcloud/fix/noid/updater-backup-cleanup
also use updatedir for cleanup of backups
-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"); |