From 2da8d9099638fac45266e006db69423a0c8f1cb5 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 18 Jun 2020 09:03:18 -0700 Subject: [PATCH] Add force_sep=/ to root_directory. --- epubfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epubfile.py b/epubfile.py index cabfd77..4a7dcce 100644 --- a/epubfile.py +++ b/epubfile.py @@ -366,7 +366,7 @@ class Epub: def __init_from_dir(self, directory): self.is_zip = False - self.root_directory = pathclass.Path(directory) + self.root_directory = pathclass.Path(directory, force_sep='/') def __init_from_file_read_only(self, epub_path): # It may appear that is_zip is a synonym for read_only, but don't forget @@ -374,7 +374,7 @@ class Epub: # readonly dirs don't need a special init, all they have to do is # forbid writes. self.is_zip = True - self.root_directory = pathclass.Path(epub_path) + self.root_directory = pathclass.Path(epub_path, force_sep='/') self.zip = zipfile.ZipFile(self.root_directory.absolute_path) def __init_from_file(self, epub_path):