[New-bugs-announce] [issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path
report at bugs.python.org
Fri Feb 8 07:15:38 CET 2008
New submission from André Fritzsche:
Checks if 'dst' starts with 'src', which can return a wrong result if
'dst' even starts with 'scr' but isn't really a subdirector of it. E.g.
(src=r'C:\data', dst=r'C:\data.old') returned true, although dst isn't a
subdirectory of src.
I tried to fix this creating the absolute paths of 'dst' and 'src'
appended the path seperator, if there wasn't one. Then did the check
again and now the result is correct.
See the diff file I've appended (and hopefully created correctly)
components: Library (Lib)
title: shutil.destinsrc returns wrong result when source path matches beginning of destination path
versions: Python 2.4
Added file: http://bugs.python.org/file9389/shutil.diff
Tracker <report at bugs.python.org>
More information about the New-bugs-announce