fix make_dest_filename to really not end up with similar dest filenames
authorgc <gc>
Sat, 12 Nov 2005 16:59:28 +0000 (16:59 +0000)
committergc <gc>
Sat, 12 Nov 2005 16:59:28 +0000 (16:59 +0000)
lib/booh/booh-lib.rb

index b660846..c361ecb 100644 (file)
@@ -55,7 +55,7 @@ module Booh
         #- we remove non alphanumeric characters but need to do that
         #- cleverly to not end up with two similar dest filenames. we won't
         #- urlencode because urldecode might happen in the browser.
-        return orig_filename.unpack("C*").collect { |v| v.chr =~ /[a-zA-Z\-_0-9\.\/]/ ? v.chr : sprintf("%2X", v) }.to_s
+        return orig_filename.unpack("C*").collect { |v| v.chr =~ /[a-zA-Z\-0-9\.\/]/ ? v.chr : sprintf("_%2X", v) }.to_s
     end
 
     def msg(verbose_level, msg)