Skip to content

Commit 6d9fa23

Browse files
authored
Merge pull request openWB#812 from benderl/fix-backup
Backport backup fixes
2 parents 8c18e7a + d053c8a commit 6d9fa23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

public/uploadFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ function check_gzip() {
2121
// quick check for file contents
2222
function check_restore_file_contents() {
2323
$output = null;
24-
$result = exec("tar --list --file=\"" . $_FILES["file"]["tmp_name"] . "\" | grep -c \"^\(mosquitto/\|mosquitto_local/\|GIT_HASH\|GIT_BRANCH\|SHA256SUM\|backup.log\)$\"", $output);
24+
$result = exec("tar --list --file=\"" . $_FILES["file"]["tmp_name"] . "\" | egrep -c \"^(mosquitto/.+|mosquitto_local/.+|GIT_HASH|GIT_BRANCH|SHA256SUM|backup.log)$\"", $output);
2525
if ($result === false || $result != "6") {
2626
exit_with_error("Prüfung des Archivinhalts fehlgeschlagen! Das Archiv ist unvollständig.");
2727
}
28-
$result = exec("tar --list --file=\"" . $_FILES["file"]["tmp_name"] . "\" | grep -c \"^openWB/.*\"", $output);
28+
$result = exec("tar --list --file=\"" . $_FILES["file"]["tmp_name"] . "\" | grep -c \"^openWB/\"", $output);
2929
if ($result === false || $result <= 4) {
3030
exit_with_error("Prüfung des Archivinhalts fehlgeschlagen! Das Archiv ist unvollständig.");
3131
}

0 commit comments

Comments
 (0)