make sure absolute package paths start with a slash and are readable files
This commit is contained in:
parent
2fd3d768e8
commit
0dfd9adf2b
1 changed files with 6 additions and 0 deletions
|
@ -4363,9 +4363,15 @@ sub main() {
|
||||||
if (!defined $pkg) {
|
if (!defined $pkg) {
|
||||||
error "cannot resolve absolute path of $pkg: $!";
|
error "cannot resolve absolute path of $pkg: $!";
|
||||||
}
|
}
|
||||||
|
if ($pkg !~ /^\//) {
|
||||||
|
error "absolute path of $pkg doesn't start with a slash";
|
||||||
|
}
|
||||||
if (!-f $pkg) {
|
if (!-f $pkg) {
|
||||||
error "$pkg is not an existing file";
|
error "$pkg is not an existing file";
|
||||||
}
|
}
|
||||||
|
if (!-r $pkg) {
|
||||||
|
error "$pkg is not readable";
|
||||||
|
}
|
||||||
return $pkg;
|
return $pkg;
|
||||||
};
|
};
|
||||||
if ($opt_value =~ /^[?~!(]/) {
|
if ($opt_value =~ /^[?~!(]/) {
|
||||||
|
|
Loading…
Reference in a new issue