[Python-bugs-list] [ python-Bugs-490168 ] shutil.copy(path, path) deletes contents

noreply@sourceforge.net noreply@sourceforge.net
Sat, 08 Dec 2001 09:17:33 -0800


Bugs item #490168, was opened at 2001-12-07 01:16
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=490168&group_id=5470

Category: Python Library
Group: Python 2.1.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: shutil.copy(path, path) deletes contents

Initial Comment:
If source equals destination path the contents of the 
file is deleted.

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-08 09:17

Message:
Logged In: YES 
user_id=6380

I know the Unix 'cp' command tests for this condition, but
shouldn't this fall in the category of "don't do that, then"
in the Python world? How stupid do we expect the programmer
to be?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=490168&group_id=5470