diff --git a/plugins/FilePack/FilePackPlugin.py b/plugins/FilePack/FilePackPlugin.py index 5a8dd533..e80f9de5 100644 --- a/plugins/FilePack/FilePackPlugin.py +++ b/plugins/FilePack/FilePackPlugin.py @@ -31,9 +31,9 @@ def openArchive(archive_path, path_within): archive = archive_cache[archive_path] if archive_path.endswith(".zip"): - return archive.open(path_within.decode("utf8")) + return archive.open(path_within) else: - return archive.extractfile(path_within) + return archive.extractfile(path_within.encode("utf8")) @PluginManager.registerTo("UiRequest") @@ -41,7 +41,7 @@ class UiRequestPlugin(object): def actionSiteMedia(self, path, header_length=True): if ".zip/" in path or ".tar.gz/" in path: path_parts = self.parsePath(path) - file_path = "%s/%s/%s" % (config.data_dir, path_parts["address"], path_parts["inner_path"]) + file_path = u"%s/%s/%s" % (config.data_dir, path_parts["address"], path_parts["inner_path"].decode("utf8")) match = re.match("^(.*\.(?:tar.gz|tar.bz2|zip))/(.*)", file_path) archive_path, path_within = match.groups() if not os.path.isfile(archive_path): diff --git a/src/Config.py b/src/Config.py index 4781e8ee..dfe79ff1 100644 --- a/src/Config.py +++ b/src/Config.py @@ -10,7 +10,7 @@ class Config(object): def __init__(self, argv): self.version = "0.5.2" - self.rev = 1936 + self.rev = 1940 self.argv = argv self.action = None self.config_file = "zeronet.conf"