[Thilo Molitor] Ability to separate plugins dir when using -s option.

This commit is contained in:
Yann Leboulanger
2018-03-07 13:47:06 +01:00
parent 9794deeaec
commit be3f2d160e
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
[info] [info]
name: Plugin Installer name: Plugin Installer
short_name: plugin_installer short_name: plugin_installer
version: 0.20.0 version: 0.20.1
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>

View File

@@ -528,7 +528,7 @@ class DownloadAsync(threading.Thread):
local_dir = os.path.join(user_dir, remote_dir) local_dir = os.path.join(user_dir, remote_dir)
if not os.path.isdir(local_dir): if not os.path.isdir(local_dir):
os.mkdir(local_dir) os.mkdir(local_dir)
local_dir = os.path.split(user_dir)[0] local_dir = os.path.dirname(local_dir)
# downloading zip file # downloading zip file
try: try:
@@ -538,7 +538,7 @@ class DownloadAsync(threading.Thread):
log.exception("Error downloading plugin %s" % filename) log.exception("Error downloading plugin %s" % filename)
continue continue
with ZipFile(buf) as zip_file: with ZipFile(buf) as zip_file:
zip_file.extractall(os.path.join(local_dir, 'plugins')) zip_file.extractall(local_dir)
GLib.idle_add(self.plugin.on_plugin_downloaded, self.remote_dirs) GLib.idle_add(self.plugin.on_plugin_downloaded, self.remote_dirs)