[Patches] [ python-Patches-604600 ] For Bug [ 490168 ] shutil.copy(path, pat

noreply@sourceforge.net noreply@sourceforge.net
Wed, 04 Sep 2002 09:21:20 -0700


Patches item #604600, was opened at 2002-09-04 19:21
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=604600&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Christos Georgiou (tzot)
Assigned to: Nobody/Anonymous (nobody)
Summary: For Bug [ 490168 ] shutil.copy(path, pat

Initial Comment:
As the bug says, shutil.copy(src, dst) deletes the
contents of src if it is the same as dst.  Example:
$ pwd
/home/tzot
$ echo hello >file01
$ ln file01 file02
$ echo hello >file03
$ ln -s file03 file04
$ echo hello >file05
$ python
Python 2.3a0 (#26, Sep  4 2002, 17:39:22) [C] on irix646
Type "help", "copyright", "credits" or "license" for
more information.
>>> from shutil import copyfile
>>> copyfile('file01', 'file02')
>>> copyfile('file03', 'file04')
>>> copyfile('file05', '../tzot/file05')

After this sequence, all files have zero length.
The patch corrects this.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=604600&group_id=5470