From e7e87d03cd72644e80ac0427a0c4b3663469c16e Mon Sep 17 00:00:00 2001 From: Ciro Mattia Gonano Date: Tue, 5 Mar 2013 17:12:48 +0100 Subject: [PATCH] Replace backslashes in path, too (win paths) --- kcc/comic2ebook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 9dd47d3..af0841b 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -117,7 +117,7 @@ def buildNCX(dstdir, title, chapters): folder = chapter[0].replace(os.path.join(dstdir, 'OEBPS'), '').lstrip('/').lstrip('\\\\') title = os.path.basename(folder) filename = getImageFileName(os.path.join(folder, chapter[1])) - f.write("" + title + f.write("" + title + "\n") f.write("\n") f.close() @@ -176,7 +176,7 @@ def buildOPF(profile, dstdir, title, filelist, cover=None, righttoleft=False): for path in filelist: folder = path[0].replace(os.path.join(dstdir, 'OEBPS'), '').lstrip('/').lstrip('\\\\') filename = getImageFileName(path[1]) - uniqueid = os.path.join(folder, filename[0]).replace('/', '_') + uniqueid = os.path.join(folder, filename[0]).replace('/', '_').replace('\\', '_') reflist.append(uniqueid) f.write("