From 6676d85be6285826b9c1df73ce878ba9c667489d Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Thu, 27 Jun 2013 10:55:01 -0400 Subject: Create non-existent package directories Closes #17. --- dotfiles/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dotfiles/core.py b/dotfiles/core.py index f2b492b..e4c4ec6 100644 --- a/dotfiles/core.py +++ b/dotfiles/core.py @@ -211,6 +211,9 @@ class Dotfiles(object): if pkg_name in self.packages: home = os.path.join(self.homedir, sub_dir) target = self._fqpn(file, pkg_name=pkg_name) + dirname = os.path.dirname(target) + if not os.path.exists(dirname): + os.makedirs(dirname) else: home = self.homedir target = self._fqpn(file) -- cgit v1.2.3