mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
Merged revisions 69415,69591,69593 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69415 | benjamin.peterson | 2009-02-07 13:08:22 -0600 (Sat, 07 Feb 2009) | 1 line make destinsrc private ........ r69591 | martin.v.loewis | 2009-02-13 14:26:16 -0600 (Fri, 13 Feb 2009) | 1 line Update Tix build procedure. ........ r69593 | martin.v.loewis | 2009-02-13 14:51:48 -0600 (Fri, 13 Feb 2009) | 1 line Add optional code signing after merging. ........
This commit is contained in:
parent
ba01dd93d2
commit
247a9b87bd
4 changed files with 18 additions and 12 deletions
|
@ -256,7 +256,7 @@ def move(src, dst):
|
|||
os.rename(src, real_dst)
|
||||
except OSError:
|
||||
if os.path.isdir(src):
|
||||
if destinsrc(src, dst):
|
||||
if _destinsrc(src, dst):
|
||||
raise Error("Cannot move a directory '%s' into itself '%s'." % (src, dst))
|
||||
copytree(src, real_dst, symlinks=True)
|
||||
rmtree(src)
|
||||
|
@ -264,7 +264,7 @@ def move(src, dst):
|
|||
copy2(src, real_dst)
|
||||
os.unlink(src)
|
||||
|
||||
def destinsrc(src, dst):
|
||||
def _destinsrc(src, dst):
|
||||
src = abspath(src)
|
||||
dst = abspath(dst)
|
||||
if not src.endswith(os.path.sep):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue