Skip to content

Commit

Permalink
* [FIX] Fixed issue when deleting old backups
Browse files Browse the repository at this point in the history
Signed-off-by: nuxsmin <[email protected]>
  • Loading branch information
nuxsmin committed Nov 5, 2018
1 parent 19c8c8c commit 5545aa8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions lib/SP/Services/Backup/FileBackupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,19 @@ public static function getDbBackupFilename(string $path, string $hash, bool $com
*/
private function deleteOldBackups()
{
array_map('unlink', glob($this->path . DIRECTORY_SEPARATOR . '*' . ArchiveHandler::COMPRESS_EXTENSION));
array_map('unlink', glob($this->path . DIRECTORY_SEPARATOR . '*.sql'));
// array_map('unlink', glob($this->path . DIRECTORY_SEPARATOR . '_db-*' . ArchiveHandler::COMPRESS_EXTENSION));
// array_map('unlink', glob($this->path . DIRECTORY_SEPARATOR . '_app-*' . ArchiveHandler::COMPRESS_EXTENSION));
// array_map('unlink', glob($this->path . DIRECTORY_SEPARATOR . '*.sql'));

$path = $this->path . DIRECTORY_SEPARATOR . AppInfoInterface::APP_NAME;

array_map(function ($file) {
return @unlink($file);
}, array_merge(
glob($path . '_db-*'),
glob($path . '_app-*'),
glob($path . '*.sql')
));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/SP/Services/Install/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ final class Installer extends Service
*/
const VERSION = [3, 0, 0];
const VERSION_TEXT = '3.0-beta';
const BUILD = 18110502;
const BUILD = 18110503;

/**
* @var DatabaseSetupInterface
Expand Down

0 comments on commit 5545aa8

Please sign in to comment.