diff options
-rw-r--r-- | dotfiles/core.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dotfiles/core.py b/dotfiles/core.py index a1ee264..a288f69 100644 --- a/dotfiles/core.py +++ b/dotfiles/core.py @@ -38,7 +38,10 @@ class Dotfile(object): if not force: print "Skipping \"%s\", use --force to override" % self.basename return - os.remove(self.name) + if os.path.isdir(self.name): + shutil.rmtree(self.name) + else: + os.remove(self.name) os.symlink(self.target, self.name) def add(self): |