1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 17:24:17 +00:00
This commit is contained in:
deadc0de6
2022-05-21 23:18:26 +02:00
committed by deadc0de
parent 04abcb4710
commit 93025eae37
3 changed files with 8 additions and 3 deletions

View File

@@ -324,11 +324,16 @@ class CfgYaml:
def add_dotfile_to_profile(self, dotfile_key, profile_key):
"""add an existing dotfile key to a profile_key"""
# create the profile if it doesn't exist
self._new_profile(profile_key)
profile = self._yaml_dict[self.key_profiles][profile_key]
profile = self.profiles[profile_key]
# ensure profile dotfiles list is not None
if self.key_profile_dotfiles not in profile or \
profile[self.key_profile_dotfiles] is None:
profile[self.key_profile_dotfiles] = []
# add to the profile
pdfs = profile[self.key_profile_dotfiles]
if self.key_all not in pdfs and \
dotfile_key not in pdfs:

View File

@@ -115,7 +115,7 @@ class Importer:
self.log.err('importing \"{}\" failed!'.format(path))
return -1
if self._already_exists(path, dst):
if self._already_exists(src, dst):
return -1
self.log.dbg('import dotfile: src:{} dst:{}'.format(src, dst))