Fix adding of books to the 505 on windows.

This commit is contained in:
Kovid Goyal 2007-11-14 03:15:58 +00:00
parent 2422b77984
commit c7d2ac059e

View File

@ -376,7 +376,7 @@ class PRS505(Device):
info = metadata.next()
path = location[0]
on_card = 1 if location[3] else 0
name = path.rpartition('/')[2]
name = path.rpartition(os.sep)[2]
name = (cls.CARD_PATH_PREFIX+'/' if on_card else 'database/media/books/') + name
name = name.replace('//', '/')
booklists[on_card].add_book(info, name, *location[1:-1])