diff --git a/FilePack/FilePackPlugin.py b/FilePack/FilePackPlugin.py index a095c6d..1c93131 100644 --- a/FilePack/FilePackPlugin.py +++ b/FilePack/FilePackPlugin.py @@ -45,7 +45,7 @@ def actionSiteMedia(self, path, **kwargs): file_obj = None path_parts = self.parsePath(path) file_path = "%s/%s/%s" % (config.data_dir, path_parts["address"], path_parts["inner_path"]) - match = re.match("^(.*\.(?:tar.gz|zip))/(.*)", file_path) + match = re.match(r"^(.*\.(?:tar.gz|zip))/(.*)", file_path) archive_path, path_within = match.groups() if archive_path not in archive_cache: site = self.server.site_manager.get(path_parts["address"]) @@ -99,7 +99,7 @@ def streamFile(self, file): class SiteStoragePlugin(object): def isFile(self, inner_path): if ".zip/" in inner_path or ".tar.gz/" in inner_path: - match = re.match("^(.*\.(?:tar.gz|zip))/(.*)", inner_path) + match = re.match(r"^(.*\.(?:tar.gz|zip))/(.*)", inner_path) archive_inner_path, path_within = match.groups() return super(SiteStoragePlugin, self).isFile(archive_inner_path) else: @@ -127,7 +127,7 @@ def openArchive(self, inner_path): def walk(self, inner_path, *args, **kwags): if ".zip" in inner_path or ".tar.gz" in inner_path: - match = re.match("^(.*\.(?:tar.gz|zip))(.*)", inner_path) + match = re.match(r"^(.*\.(?:tar.gz|zip))(.*)", inner_path) archive_inner_path, path_within = match.groups() archive = self.openArchive(archive_inner_path) path_within = path_within.lstrip("/") @@ -151,7 +151,7 @@ def walk(self, inner_path, *args, **kwags): def list(self, inner_path, *args, **kwags): if ".zip" in inner_path or ".tar.gz" in inner_path: - match = re.match("^(.*\.(?:tar.gz|zip))(.*)", inner_path) + match = re.match(r"^(.*\.(?:tar.gz|zip))(.*)", inner_path) archive_inner_path, path_within = match.groups() archive = self.openArchive(archive_inner_path) path_within = path_within.lstrip("/") @@ -178,7 +178,7 @@ def list(self, inner_path, *args, **kwags): def read(self, inner_path, mode="rb", **kwargs): if ".zip/" in inner_path or ".tar.gz/" in inner_path: - match = re.match("^(.*\.(?:tar.gz|zip))(.*)", inner_path) + match = re.match(r"^(.*\.(?:tar.gz|zip))(.*)", inner_path) archive_inner_path, path_within = match.groups() archive = self.openArchive(archive_inner_path) path_within = path_within.lstrip("/")