summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 9a5f78a..d884d0a 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -265,4 +265,10 @@ def move(src, dst):
os.unlink(src)
def destinsrc(src, dst):
- return abspath(dst).startswith(abspath(src))
+ src = abspath(src)
+ dst = abspath(dst)
+ if not src.endswith(os.path.sep):
+ src += os.path.sep
+ if not dst.endswith(os.path.sep):
+ dst += os.path.sep
+ return dst.startswith(src)