From b4a790a736f3bb5fdd7ef9fef97ca32ce9f52fe5 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 3 Mar 2010 13:27:30 -0800 Subject: [PATCH] Fix handling filenames with space with overwrite=1 in fileImport.pl. Fixes bug #11453 --- docs/changelog/7.x.x.txt | 1 + sbin/fileImport.pl | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 458fd3df1..45d9fc930 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -7,6 +7,7 @@ - fixed #11443: no language switch in rich edit - fixed #11450: How to lock yourself out of your WebGUI site... - fixed #11402: Survey TAP module requirements + - fixed #11453: fileUpload.pl does not handle files with spaces, overwriting 7.8.13 - fixed #11418: confusing typ-o in gotcha diff --git a/sbin/fileImport.pl b/sbin/fileImport.pl index 62a0810f5..29bdfbd92 100755 --- a/sbin/fileImport.pl +++ b/sbin/fileImport.pl @@ -266,14 +266,15 @@ sub buildFileList { exit 2; } + my $filename = $session->url->urlize($file); push(@filelist, { ext=>$ext, - filename=>$file, + filename=>$filename, fullPathFile => $fullpathfile, }); - $filelisthash{$file} = $fullpathfile; - print "Found file $file.\n" unless ($quiet); + $filelisthash{$filename} = $fullpathfile; + print "Found file $file as $filename.\n" unless ($quiet); } # TB : the recursive call push(@filelist, buildFileList($now,"$fullpathfile")) if ((-d "$fullpathfile") && $recursive);