From 1de2e370b5ca996d4e5df76fef85bbf2ecf39842 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 10 Nov 2010 16:45:25 -0800 Subject: [PATCH] Handle directory name with a space --- updown/fetch.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/updown/fetch.cgi b/updown/fetch.cgi index bfa00c11a..2f1b57692 100755 --- a/updown/fetch.cgi +++ b/updown/fetch.cgi @@ -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', "".&html_escape($out).""));