diff options
Diffstat (limited to 'core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php')
-rw-r--r-- | core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php index 4489afe1f02..c24c8aa05a3 100644 --- a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php +++ b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php @@ -48,18 +48,18 @@ class BackgroundCleanupUpdaterBackupsJob extends QueuedJob { $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); $instanceId = $this->config->getSystemValue('instanceid', null); - if(!is_string($instanceId) || empty($instanceId)) { + if (!is_string($instanceId) || empty($instanceId)) { return; } $updaterFolderPath = $dataDir . '/updater-' . $instanceId; $backupFolderPath = $updaterFolderPath . '/backups'; - if(file_exists($backupFolderPath)) { + if (file_exists($backupFolderPath)) { $this->log->info("$backupFolderPath exists - start to clean it up"); $dirList = []; $dirs = new \DirectoryIterator($backupFolderPath); - foreach($dirs as $dir) { + foreach ($dirs as $dir) { // skip files and dot dirs if ($dir->isFile() || $dir->isDot()) { continue; @@ -80,7 +80,7 @@ class BackgroundCleanupUpdaterBackupsJob extends QueuedJob { $dirList = array_slice($dirList, 0, -3); $this->log->info("List of all directories that will be deleted: " . json_encode($dirList)); - foreach($dirList as $dir) { + foreach ($dirList as $dir) { $this->log->info("Removing $dir ..."); \OC_Helper::rmdirr($dir); } |