Commit 114d194d authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Check compression program exists

parent 90b994b8
......@@ -1065,10 +1065,20 @@ sub backup
}
# Do backup
# If we backing up or restoring, we need to check the compression program
if (defined($optctl{'backup'}) || defined($optctl{'restore'})) {
# One last check for to make sure the compression program exists
if (checkPATH(my $compressProgram = "compress-".$config{'compress'})) {
print(STDERR "ERROR: Compression program '$compressProgram' cannot be found in path!");
exit 1;
}
}
# Check if we backing up
if (defined($optctl{'backup'})) {
backup($sourceDir,$destDir);
# Or restoring...
} elsif (defined($optctl{'restore'})) {
restore($sourceDir,$destDir);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment