From 024b6d63be563c43573dfa2e3686b633909bf5cb Mon Sep 17 00:00:00 2001 From: Jack Foltz Date: Sun, 9 Dec 2018 01:19:55 -0500 Subject: [PATCH] Fix config location inference --- lib/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/package.py b/lib/package.py index 2e04172..9d718c8 100644 --- a/lib/package.py +++ b/lib/package.py @@ -52,6 +52,7 @@ class Package: def transform_default(self, prop, default, basepath): default_path = local_path(basepath, default) + print(default_path) if hasattr(self, prop): if isinstance(self[prop], list): self[prop] = list(map(lambda p: local_path(basepath, p), self[prop])) @@ -59,13 +60,13 @@ class Package: self[prop] = None elif self[prop] != None: self[prop] = [local_path(basepath, self[prop])] - elif (Path(basepath) / default_path).is_dir() or (Path(basepath) / default_path).is_file(): + elif default_path.is_dir() or default_path.is_file(): self[prop] = [default_path] else: self[prop] = None def update_from_files(self): - self.transform_default('config', self.name, 'lain/') + self.transform_default('config', self.name, 'lain/.config/') self.transform_default('script', self.name + '.fish', 'scripts/') self.transform_default('userunit', self.name + '.service', 'lain/.config/systemd/user/')