aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 826baa83..5305d46b 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -1836,7 +1836,11 @@ def unsuffixed_basename(name):
return os.path.basename(unsuffixed(name))
def safe_move(src, dst):
- if os.path.abspath(src) == os.path.abspath(dst):
+ src = os.path.abspath(src)
+ dst = os.path.abspath(dst)
+ if os.path.isdir(dst):
+ dst = os.path.join(dst, os.path.basename(src))
+ if src == dst:
return
shutil.move(src, dst)