diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 96140ce195..753b1722de 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -421,16 +421,16 @@ class DirContainer(object): return f.read() def write(self, path, data): - path = os.path.join(self.rootdir, path) + path = os.path.join(self.rootdir, urlunquote(path)) dir = os.path.dirname(path) if not os.path.isdir(dir): os.makedirs(dir) - with open(urlunquote(path), 'wb') as f: + with open(path, 'wb') as f: return f.write(data) def exists(self, path): - path = os.path.join(self.rootdir, path) - return os.path.isfile(urlunquote(path)) + path = os.path.join(self.rootdir, urlunquote(path)) + return os.path.isfile(path) def namelist(self): names = [] diff --git a/src/calibre/ebooks/oeb/writer.py b/src/calibre/ebooks/oeb/writer.py index 9c7c1af48d..25365991d0 100644 --- a/src/calibre/ebooks/oeb/writer.py +++ b/src/calibre/ebooks/oeb/writer.py @@ -62,6 +62,7 @@ class OEBWriter(object): output = DirContainer(path, oeb.log) for item in oeb.manifest.values(): output.write(item.href, str(item)) + if version == 1: metadata = oeb.to_opf1() elif version == 2: diff --git a/src/calibre/translations/sv.po b/src/calibre/translations/sv.po index 13b37d9401..d072ec9d14 100644 --- a/src/calibre/translations/sv.po +++ b/src/calibre/translations/sv.po @@ -2245,7 +2245,7 @@ msgstr "" "kommando ...\n" "\n" "Kommandot kan vara något av följande:\n" -"[%% kommandon]\n" +"[%%commands]\n" "\n" "Använd %prog kommando --help för att få mer information om ett visst " "kommando\n" @@ -6213,7 +6213,7 @@ msgstr "
" msgstr "" -"%s b>:%s av Kovid Goyal%% (version) s b>