Skip to content

Commit ee67dd8

Browse files
authored
Merge pull request #34364 from nextcloud/fix/noid/updater-backup-cleanup
also use updatedir for cleanup of backups
2 parents f97f13b + 6ec5c47 commit ee67dd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ public function __construct(IConfig $config, LoggerInterface $log, ITimeFactory
4545
* This job cleans up all backups except the latest 3 from the updaters backup directory
4646
*/
4747
public function run($arguments) {
48-
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
48+
$updateDir = $this->config->getSystemValue('updatedirectory', null) ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
4949
$instanceId = $this->config->getSystemValue('instanceid', null);
5050

5151
if (!is_string($instanceId) || empty($instanceId)) {
5252
return;
5353
}
5454

55-
$updaterFolderPath = $dataDir . '/updater-' . $instanceId;
55+
$updaterFolderPath = $updateDir . '/updater-' . $instanceId;
5656
$backupFolderPath = $updaterFolderPath . '/backups';
5757
if (file_exists($backupFolderPath)) {
5858
$this->log->info("$backupFolderPath exists - start to clean it up");

0 commit comments

Comments
 (0)