summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dotfiles/core.py5
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):