Commit c5d1f56f authored by Philipp Hörist's avatar Philipp Hörist

[plugin_installer] ZipFile supports only posix paths

This was a problem on Windows
parent 3832b592
...@@ -39,7 +39,8 @@ class PluginInfo: ...@@ -39,7 +39,8 @@ class PluginInfo:
@classmethod @classmethod
def from_zip_file(cls, zip_file, manifest_path): def from_zip_file(cls, zip_file, manifest_path):
config = ConfigParser() config = ConfigParser()
with as manifest_file: # ZipFile can only handle posix paths
with as manifest_file:
try: try:
config.read_string( config.read_string(
except configparser.Error as error: except configparser.Error as error:
...@@ -167,12 +168,13 @@ def is_manifest_valid(config): ...@@ -167,12 +168,13 @@ def is_manifest_valid(config):
def load_icon_from_zip(zip_file, icon_path): def load_icon_from_zip(zip_file, icon_path):
# ZipFile can only handle posix paths
try: try:
zip_file.getinfo(str(icon_path)) zip_file.getinfo(icon_path.as_posix())
except KeyError: except KeyError:
return None return None
with as png_file: with as png_file:
data = data =
pixbuf = GdkPixbuf.PixbufLoader() pixbuf = GdkPixbuf.PixbufLoader()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment