Make plugin_installer more robust to filepath layout changes
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Plugin Installer
|
name: Plugin Installer
|
||||||
short_name: plugin_installer
|
short_name: plugin_installer
|
||||||
version: 0.13.1
|
version: 0.14
|
||||||
description: Install and upgrade plugins from ftp
|
description: Install and upgrade plugins from ftp
|
||||||
authors: Denis Fomin <fominde@gmail.com>
|
authors: Denis Fomin <fominde@gmail.com>
|
||||||
Yann Leboulanger <asterix@lagaule.org>
|
Yann Leboulanger <asterix@lagaule.org>
|
||||||
|
|||||||
@@ -602,7 +602,7 @@ class Ftp(threading.Thread):
|
|||||||
# downloading zip file
|
# downloading zip file
|
||||||
GLib.idle_add(self.progressbar.set_text,
|
GLib.idle_add(self.progressbar.set_text,
|
||||||
_('Downloading "%s"') % filename)
|
_('Downloading "%s"') % filename)
|
||||||
full_filename = os.path.join(local_dir, 'plugins', filename)
|
full_filename = os.path.join(user_dir, filename)
|
||||||
self.buffer_ = io.BytesIO()
|
self.buffer_ = io.BytesIO()
|
||||||
try:
|
try:
|
||||||
self.ftp.retrbinary('RETR %s' % filename, self.handleDownload)
|
self.ftp.retrbinary('RETR %s' % filename, self.handleDownload)
|
||||||
@@ -610,7 +610,7 @@ class Ftp(threading.Thread):
|
|||||||
print (str(e))
|
print (str(e))
|
||||||
|
|
||||||
with zipfile.ZipFile(self.buffer_) as zip_file:
|
with zipfile.ZipFile(self.buffer_) as zip_file:
|
||||||
zip_file.extractall(os.path.join(local_dir, 'plugins'))
|
zip_file.extractall(os.path.join(user_dir))
|
||||||
|
|
||||||
self.ftp.quit()
|
self.ftp.quit()
|
||||||
GLib.idle_add(self.window.emit, 'plugin_downloaded', self.remote_dirs)
|
GLib.idle_add(self.window.emit, 'plugin_downloaded', self.remote_dirs)
|
||||||
|
|||||||
Reference in New Issue
Block a user