From b8786a3fa877fe24241f4edc7f0657b94edec7fa Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 27 Dec 2018 15:51:31 +0100 Subject: [PATCH] fix pivot strip home --- dotdrop/installer.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dotdrop/installer.py b/dotdrop/installer.py index 5292bae..71bb2d2 100644 --- a/dotdrop/installer.py +++ b/dotdrop/installer.py @@ -252,10 +252,16 @@ class Installer: def _pivot_path(self, path, newdir, striphome=False): """change path to be under newdir""" + if self.debug: + self.log.dbg('pivot new dir: \"{}\"'.format(newdir)) + self.log.dbg('strip home: {}'.format(striphome)) if striphome: - utils.strip_home(path) + path = utils.strip_home(path) sub = path.lstrip(os.sep) - return os.path.join(newdir, sub) + new = os.path.join(newdir, sub) + if self.debug: + self.log.dbg('pivot \"{}\" to \"{}\"'.format(path, new)) + return new def _exec_pre_actions(self, actions): """execute pre-actions if any"""