1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 08:29:17 +00:00

Fixing src path in dotfiles to allow different dotpaths than the current one

This commit is contained in:
Davide Laezza
2019-04-23 12:55:23 +02:00
parent 2d66e1847e
commit 649575116b
4 changed files with 114 additions and 9 deletions

View File

@@ -352,8 +352,12 @@ class Cfg:
dotfiles = self.content[self.key_dotfiles]
noempty_default = self.lnk_settings[self.key_ignoreempty]
dotpath = self.content['config']['dotpath']
for k, v in dotfiles.items():
src = os.path.normpath(v[self.key_dotfiles_src])
src = v[self.key_dotfiles_src]
if dotpath not in src:
src = os.path.join(dotpath, src)
src = os.path.normpath(self._abs_path(src))
dst = os.path.normpath(v[self.key_dotfiles_dst])
# Fail if both `link` and `link_children` present