From 1934360cf4a2c505d72683a28bd5693df5b559b5 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Thu, 10 Mar 2022 23:09:59 +0100 Subject: [PATCH] https://github.com/the-djmaze/snappymail/issues/185#issuecomment-1064370753 --- build/deb.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/deb.php b/build/deb.php index 4d172ef765..e7901d1494 100755 --- a/build/deb.php +++ b/build/deb.php @@ -54,7 +54,9 @@ passthru('rm -dfr '.escapeshellarg(DEB_DEST_DIR)); // https://github.com/the-djmaze/snappymail/issues/185#issuecomment-1059420588 -passthru('dpkg-scanpackages ' . escapeshellarg($TARGET_DIR) . ' /dev/null | gzip -9c > '.escapeshellarg($TARGET_DIR . 'Packages.gz')); +$cwd = getcwd(); +chdir($TARGET_DIR); +passthru('dpkg-scanpackages . /dev/null | gzip -9c > '.escapeshellarg($TARGET_DIR . 'Packages.gz')); $size = filesize($TARGET_DIR . 'Packages.gz'); $Release = 'Origin: SnappyMail Repository Label: SnappyMail @@ -73,3 +75,4 @@ ' . hash_file('sha256', $TARGET_DIR . 'Packages.gz') . ' ' . $size . ' Packages.gz '; file_put_contents($TARGET_DIR . 'Release', $Release); +chdir($cwd);