1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 16:14:21 +00:00

fix bug for #157

This commit is contained in:
deadc0de6
2019-06-10 20:36:58 +02:00
parent 9d0c30e633
commit 7bd5d7fd45
2 changed files with 11 additions and 5 deletions

View File

@@ -93,13 +93,12 @@ class Updater:
new_path = self._apply_trans_w(path, dotfile)
if not new_path:
return False
path = new_path
if os.path.isdir(path):
ret = self._handle_dir(path, dtpath)
if os.path.isdir(new_path):
ret = self._handle_dir(new_path, dtpath)
else:
ret = self._handle_file(path, dtpath)
ret = self._handle_file(new_path, dtpath)
# clean temporary files
if new_path and os.path.exists(new_path):
if new_path != path and os.path.exists(new_path):
remove(new_path)
return ret