From df95cefa85cd7b1e7cda6762863e05e52f6dcc65 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 4 May 2021 19:24:36 +0200 Subject: [PATCH] compression of ".htdeployment" changed to gzip --- src/Deployment/Deployer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Deployment/Deployer.php b/src/Deployment/Deployer.php index 7f5cf98..1039dda 100644 --- a/src/Deployment/Deployer.php +++ b/src/Deployment/Deployer.php @@ -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) { @@ -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; }