Skip to content

Commit 21ad988

Browse files
author
Perttu Ehn
committed
[database:dump] Don't duplicate .gz extension
1 parent d6c749c commit 21ad988

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Command/Database/DumpCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
127127
if ($this->shellProcess->exec($command, $this->appRoot)) {
128128
$resultFile = $file;
129129
if ($gz) {
130-
$resultFile = $file . ".gz";
130+
if(substr($file, -3) != '.gz') {
131+
$resultFile = $file . ".gz";
132+
}
131133
file_put_contents(
132134
$resultFile,
133135
gzencode(

0 commit comments

Comments
 (0)