mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
also use updatedir for cleanup of backups
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
f323c5b854
commit
6ec5c4715c
1 changed files with 2 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue