From 419f266f0fdf031319f7a6d2964864c5ef8a3f12 Mon Sep 17 00:00:00 2001 From: brent s Date: Sun, 2 Jun 2019 11:30:45 -0400 Subject: [PATCH] need the absolute path for the plugin --- storage/backups/borg/backup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/backups/borg/backup.py b/storage/backups/borg/backup.py index a817939..ddd87fb 100755 --- a/storage/backups/borg/backup.py +++ b/storage/backups/borg/backup.py @@ -274,7 +274,7 @@ class Backup(object): _orig_path = sys.path for plugin in repo['plugins']: if repo['plugins'][plugin]['path']: - sys.path.insert(1, repo['plugins'][plugin]['path'] + sys.path) + sys.path.insert(1, os.path.abspath(os.path.expanduser(repo['plugins'][plugin]['path']))) optools_tmpmod = importlib.import_module(plugin, package = None) if not repo['plugins'][plugin]['params']: optools_tmpmod.Backup() @@ -335,6 +335,7 @@ class Backup(object): def restore(self): # TODO: support "--strip-components N"? # TODO: support add'l args? + # TODO: Restore() class in plugins? # https://borgbackup.readthedocs.io/en/stable/usage/extract.html orig_dir = os.getcwd() self.logger.info('START: restore')