Handle directory name with a space

This commit is contained in:
Jamie Cameron
2010-11-10 16:45:25 -08:00
parent c5b5cbd63a
commit 1de2e370b5

View File

@@ -40,8 +40,10 @@ if ($ENV{'PATH_INFO'}) {
if (-d $file) {
# Zip up the whole directory
($shortfile = $file) =~ s/^.*\///g;
$shortfile =~ s/\s+//g;
$temp = &transname($shortfile.".zip");
$out = &backquote_command("cd ".quotemeta($file)." && zip -r $temp .");
$out = &backquote_command("cd ".quotemeta($file).
" && zip -r ".quotemeta($temp)." .");
if ($?) {
&error(&text('fetch_ezipcmd',
"<tt>".&html_escape($out)."</tt>"));