fixes #9, now works well with spaces in filenames

This commit is contained in:
Pedro Guridi 2013-12-17 20:33:40 -03:00
parent f3bdc34994
commit 907637a633

View file

@ -28,10 +28,8 @@ class Converter():
for extension in extensions: for extension in extensions:
for f in fnmatch.filter(files, "*.%s" % extension): for f in fnmatch.filter(files, "*.%s" % extension):
p = os.path.join(dirpath, f) p = os.path.join(dirpath, f)
renamed = p.replace(" ", "_")
os.rename(p, renamed)
#print "Found file: %s with extension %s" % (renamed, extension) #print "Found file: %s with extension %s" % (renamed, extension)
filepaths.append((renamed, extension)) filepaths.append((p, extension))
return filepaths return filepaths
def convert(self, orig_path, from_format, to_format, output_folder): def convert(self, orig_path, from_format, to_format, output_folder):