end
class Pathname
- def nuescape
- s = @path.gsub(/([\/%]+)/n){
- "%" + $1.unpack("H2" * $1.size).join("%").upcase
- }
- Pathname.new(s)
- end
-
def escape
-# s = self.basename.to_s.gsub(/([\/%<>*?]+)/n){
- s = self.basename.to_s.gsub(/([\/<>*?]+)/n){
+ s = self.basename.to_s.gsub(/([\/%]+)/n){
"%" + $1.unpack("H2" * $1.size).join("%").upcase
}
Pathname.new(self.dirname+s)
print "escape special characters"
Find.find(tmpdir+"/chise-db") {|f|
next if f.path.directory?
- nf = f.path.escape.to_s
+ nf = f.path.escape.unix_to_win.to_s
next if f == nf
cmd = "mv '#{f}' '#{nf}'"
#puts cmd