Update plugin.py

https://github.com/spesmilo/electrum/issues/10220
This commit is contained in:
copronista
2025-09-13 23:12:44 -04:00
committed by GitHub
parent c1ab6cda53
commit 6be8e3ec88

View File

@@ -794,7 +794,7 @@ class Plugins(DaemonThread):
metadata = self.external_plugin_metadata[name] metadata = self.external_plugin_metadata[name]
dirname = metadata['dirname'] dirname = metadata['dirname']
with zipfile_lib.ZipFile(plugin_filename) as myzip: with zipfile_lib.ZipFile(plugin_filename) as myzip:
with myzip.open(os.path.join(dirname, filename)) as myfile: with myzip.open("/".join([dirname,filename])) as myfile:
return myfile.read() return myfile.read()
elif name in self.internal_plugin_metadata: elif name in self.internal_plugin_metadata:
path = os.path.join(os.path.dirname(__file__), 'plugins', name, filename) path = os.path.join(os.path.dirname(__file__), 'plugins', name, filename)