more sanity checks of target directory
This commit is contained in:
parent
dbce1ee27b
commit
0f5d935941
1 changed files with 6 additions and 0 deletions
|
@ -6615,6 +6615,12 @@ sub main() {
|
||||||
error "stdout is an interactive tty";
|
error "stdout is an interactive tty";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (!-e dirname($options->{target})) {
|
||||||
|
error "path leading to $options->{target} does not exist";
|
||||||
|
}
|
||||||
|
if (!-d dirname($options->{target})) {
|
||||||
|
error "parent of $options->{target} is not a directory";
|
||||||
|
}
|
||||||
my $abs_path = abs_path($options->{target});
|
my $abs_path = abs_path($options->{target});
|
||||||
if (!defined $abs_path) {
|
if (!defined $abs_path) {
|
||||||
error "unable to get absolute path of target directory"
|
error "unable to get absolute path of target directory"
|
||||||
|
|
Loading…
Reference in a new issue