Skip to content

Commit

Permalink
compression of ".htdeployment" changed to gzip
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 27, 2021
1 parent 01606a0 commit df95cef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Deployment/Deployer.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private function loadDeploymentFile(): ?array
return null;
}
$s = file_get_contents($tempFile);
$content = @gzdecode($s) ?: gzinflate($s);
$content = @gzinflate($s) ?: gzdecode($s);
$res = [];
foreach (explode("\n", $content) as $item) {
if (count($item = explode('=', $item, 2)) === 2) {
Expand All @@ -236,7 +236,7 @@ public function writeDeploymentFile(array $localPaths): string
}
$file = $this->localDir . '/' . $this->deploymentFile;
@mkdir(dirname($file), 0777, true); // @ dir may exists
file_put_contents($file, gzdeflate($s, 9));
file_put_contents($file, gzencode($s, 9));
return $file;
}

Expand Down

0 comments on commit df95cef

Please sign in to comment.