Skip to content

Commit

Permalink
fix: missing dot gz
Browse files Browse the repository at this point in the history
  • Loading branch information
kocoten1992 committed Jun 1, 2022
1 parent 4104425 commit c1ffef7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/EncodeUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static function gzipFile(
int $level = 6
): string|false {
if (is_null($dest_path)) {
$dest_path = $source_path.'gz';
$dest_path = $source_path.'.gz';
}

$mode = 'wb'.$level;
Expand Down
2 changes: 1 addition & 1 deletion tests/EncodeUtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function test_gzip_file()

$dest_path = EncodeUtil::gzipFile($file_path);

$this->assertEquals($dest_path, $file_path.'gz');
$this->assertEquals($dest_path, $file_path.'.gz');

$this->assertTrue(file_exists($dest_path));

Expand Down

0 comments on commit c1ffef7

Please sign in to comment.