diff options
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index f2d2a90a8e..9d922fbefc 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -277,6 +277,12 @@ def move(src, dst): """ real_dst = dst if os.path.isdir(dst): + if _samefile(src, dst): + # We might be on a case insensitive filesystem, + # perform the rename anyway. + os.rename(src, dst) + return + real_dst = os.path.join(dst, _basename(src)) if os.path.exists(real_dst): raise Error, "Destination path '%s' already exists" % real_dst |