Fix prefix to be normalized. Apparently the python file dialog returns front-slashed filenames, even on windows.

This commit is contained in:
Charles Haley 2010-05-19 09:41:09 +01:00
parent 116f36b841
commit 1237486831
2 changed files with 1 additions and 1 deletions

View File

@ -54,6 +54,7 @@ class FOLDER_DEVICE(USBMS):
def __init__(self, path):
if not os.path.isdir(path):
raise IOError, 'Path is not a folder'
path = USBMS.normalize_path(path)
if path.endswith(os.sep):
self._main_prefix = path
else:

View File

@ -90,7 +90,6 @@ class USBMS(CLI, Device):
#print 'update_metadata_item returned true'
changed = True
else:
#print "adding new book", lpath
if bl.add_book(self.book_from_path(prefix, lpath),
replace_metadata=False):
changed = True