summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-07-04 21:16:49 -0400
committerLex Neva <github.com@lexneva.name>2018-07-12 20:13:46 -0400
commitd090fa003830f117918fac201ca527d513507a70 (patch)
tree4cf3bb9462c6c083b2ab97d493f8607733a5f9fd /lib/extensions
parenta0659e2c2d7609294c1a5a70153b1aa647595e94 (diff)
move get_bundled_dir to utils
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/install.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/extensions/install.py b/lib/extensions/install.py
index d55b96d0..42a92113 100644
--- a/lib/extensions/install.py
+++ b/lib/extensions/install.py
@@ -13,7 +13,7 @@ import logging
import wx
import inkex
-from ..utils import guess_inkscape_config_path
+from ..utils import guess_inkscape_config_path, get_bundled_dir
class InstallerFrame(wx.Frame):
@@ -78,15 +78,9 @@ class InstallerFrame(wx.Frame):
def install_addons(self, type):
path = os.path.join(self.path, type)
- src_dir = self.get_bundled_dir(type)
+ src_dir = get_bundled_dir(type)
self.copy_files(glob(os.path.join(src_dir, "*")), path)
- def get_bundled_dir(self, name):
- if getattr(sys, 'frozen', None) is not None:
- return realpath(os.path.join(sys._MEIPASS, '..', name))
- else:
- return realpath(os.path.join(dirname(realpath(__file__)), '..', '..', name))
-
if (sys.platform == "win32"):
# If we try to just use shutil.copy it says the operation requires elevation.
def copy_files(self, files, dest):