mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix prefix to be normalized. Apparently the python file dialog returns front-slashed filenames, even on windows.
This commit is contained in:
parent
116f36b841
commit
1237486831
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user