fix: add -- end-of-options marker before filename operands in tar/zip/gzip commands

Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
copilot/sub-pr-4694-another-one
copilot-swe-agent[bot] 2026-03-09 16:55:56 +00:00
parent 65ca813fe2
commit b5605e01c1
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ function downloadEvents(
}
if ($command) {
$command .= ' '.escapeshellarg($mergedFileName); # Name of the file to be added
$command .= ' -- '.escapeshellarg($mergedFileName); # Name of the file to be added
if (executeShelCommand($command, $deleteFile = $mergedFileName) === false) return false;
}
} # end foreach monitor
@ -160,7 +160,7 @@ function downloadEvents(
# Create an archive if necessary
//$exportCompressed = true; // For debugging
if ($exportCompressed) {
$command = 'gzip '.escapeshellarg($archive_path); # Name of the file to be archived
$command = 'gzip -- '.escapeshellarg($archive_path); # Name of the file to be archived
if (executeShelCommand($command) === false) return false;
$archiveFileName .= '.gz';
}