diff options
author | Anish Athalye <me@anishathalye.com> | 2015-04-27 17:03:40 -0400 |
---|---|---|
committer | Anish Athalye <me@anishathalye.com> | 2015-04-27 17:03:40 -0400 |
commit | db8364490da392b4225844ddfc32e5fa69aa3821 (patch) | |
tree | f914f64321117684a28d1c344ac353cd0bc5e3d7 /dotbot | |
parent | aa06a18cff22f9804754ddda0164761e437c61c7 (diff) | |
parent | 1a10f88c432113317387f9ad93c88c039b3907b8 (diff) |
Merge branch 'antaflos/force-symlinked-dirs'
Diffstat (limited to 'dotbot')
-rw-r--r-- | dotbot/executor/linker.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dotbot/executor/linker.py b/dotbot/executor/linker.py index d94a9bc..9821fe7 100644 --- a/dotbot/executor/linker.py +++ b/dotbot/executor/linker.py @@ -78,7 +78,9 @@ class Linker(Executor): (self._exists(path) and not self._is_link(path))): fullpath = os.path.expanduser(path) try: - if os.path.isdir(fullpath): + if os.path.islink(fullpath): + os.unlink(fullpath) + elif os.path.isdir(fullpath): shutil.rmtree(fullpath) else: os.remove(fullpath) |