Skip to content

Commit 4e5a4a7

Browse files
committed
Remove not needed code and also update CLI tool
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
1 parent d2fe011 commit 4e5a4a7

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

index.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,8 @@ public function createBackup() {
470470

471471
// Create new folder for the backup
472472
$backupFolderLocation = $this->getDataDirectoryLocation() . '/updater-'.$this->getConfigOption('instanceid').'/backups/nextcloud-'.$this->getConfigOption('version') . '-' . time() . '/';
473-
if(file_exists($backupFolderLocation)) {
474-
$this->silentLog('[info] backup folder location exists');
473+
$this->silentLog('[info] backup folder location: ' . $backupFolderLocation);
475474

476-
$this->recursiveDelete($backupFolderLocation);
477-
}
478475
$state = mkdir($backupFolderLocation, 0750, true);
479476
if($state === false) {
480477
throw new \Exception('Could not create backup folder location');

lib/Updater.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,9 @@ public function createBackup() {
352352
];
353353

354354
// Create new folder for the backup
355-
$backupFolderLocation = $this->getDataDirectoryLocation() . '/updater-'.$this->getConfigOption('instanceid').'/backups/nextcloud-'.$this->getConfigOption('version') . '/';
356-
if(file_exists($backupFolderLocation)) {
357-
$this->silentLog('[info] backup folder location exists');
355+
$backupFolderLocation = $this->getDataDirectoryLocation() . '/updater-'.$this->getConfigOption('instanceid').'/backups/nextcloud-'.$this->getConfigOption('version') . '-' . time() . '/';
356+
$this->silentLog('[info] backup folder location: ' . $backupFolderLocation);
358357

359-
$this->recursiveDelete($backupFolderLocation);
360-
}
361358
$state = mkdir($backupFolderLocation, 0750, true);
362359
if($state === false) {
363360
throw new \Exception('Could not create backup folder location');

0 commit comments

Comments
 (0)