Check that the filename we pass ends in zip, add it if not
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
0f76eda4af
commit
ba462d1e93
1 changed files with 8 additions and 1 deletions
|
@ -38,7 +38,14 @@ class SystemBackup extends Command
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
if ($this->option('filename')) {
|
if ($this->option('filename')) {
|
||||||
$this->call('backup:run', ['--filename' => $this->option('filename')]);
|
$filename = $this->option('filename');
|
||||||
|
|
||||||
|
// Make sure the filename ends in .zip
|
||||||
|
if (!ends_with($filename, '.zip')) {
|
||||||
|
$filename = $filename.'.zip';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->call('backup:run', ['--filename' => $filename]);
|
||||||
} else {
|
} else {
|
||||||
$this->call('backup:run');
|
$this->call('backup:run');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue