Commit 1f7e9439 authored by Leigh Stoller's avatar Leigh Stoller

Allow ~ in pathnames, and do not throw an error if a file to be added

to the archive does not exist (specifically, from the NFS tracing).
parent b04e296a
......@@ -223,8 +223,8 @@ sub ArchiveAdd($$;$$)
if (!defined($exact));
if (! -e $pathname || ! -r $pathname) {
print STDERR "ArchiveFile: $pathname cannot be read!\n";
return -1;
print STDERR "*** ArchiveFile: $pathname cannot be read!\n";
return 0;
}
#
......@@ -232,7 +232,7 @@ sub ArchiveAdd($$;$$)
# the directory space the user is allowed to access.
#
my $realpath = `$REALPATH $pathname`;
if ($realpath =~ /^([-\w\/\.\+\@,]+)$/) {
if ($realpath =~ /^([-\w\/\.\+\@,~]+)$/) {
$realpath = $1;
}
else {
......@@ -252,7 +252,7 @@ sub ArchiveAdd($$;$$)
}
# Strip leading / from the pathname, and taint check it.
if ($pathname =~ /^[\/]+([-\w\/\.\+\@,]+)$/) {
if ($pathname =~ /^[\/]+([-\w\/\.\+\@,~]+)$/) {
$pathname = $1;
}
else {
......
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