[ python-Bugs-919012 ] shutil.move can destroy files
SourceForge.net
noreply at sourceforge.net
Sat Jun 5 11:08:12 EDT 2004
Bugs item #919012, was opened at 2004-03-18 20:29
Message generated for change (Comment added) made by jlgijsbers
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=919012&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeff Epler (jepler)
Assigned to: Nobody/Anonymous (nobody)
Summary: shutil.move can destroy files
Initial Comment:
$ mkdir a; touch a/b; python2.3 -c 'import shutil;
shutil.move("a", "a/c")
$ ls -l a
ls: a: no such file or directory
The same problem exists on Windows, as reported by one
"shagshag".
----------------------------------------------------------------------
Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2004-06-05 17:08
Message:
Logged In: YES
user_id=469548
Here's a patch (with tests) that disallows moving a
directory inside itself altogether. I can't upload patches
to SF, so here's a link to it on my homepage:
http://home.student.uva.nl/johannes.gijsbers/shutil.diff.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=919012&group_id=5470
More information about the Python-bugs-list
mailing list