[ python-Bugs-810879 ] shutil.copyfile fails when dst exists
read-only
SourceForge.net
noreply at sourceforge.net
Mon Feb 16 18:52:47 EST 2004
Bugs item #810879, was opened at 2003-09-22 19:21
Message generated for change (Comment added) made by tim_one
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=810879&group_id=5470
Category: Windows
Group: Python 2.2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Ray Pasco (pascor)
>Assigned to: A.M. Kuchling (akuchling)
Summary: shutil.copyfile fails when dst exists read-only
Initial Comment:
(WIN32): shutil.copyfile fails when the dst file already
exists, but in read-only mode. As the old file is
about to be
clobbered, a fix I've been using is to delete the
orginal file
first. The attached my be inelegant, but works fine
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2004-02-16 18:52
Message:
Logged In: YES
user_id=31435
Andrew, what does this do on Unix? I don't *want* copyfile()
to clobber read-only files, so I view this report as a small lack
in the docs (which unconditionally say dst will be replaced).
If the user lacks sufficient write permissions on Unix (a decent
approximation to Windows "read only" state), does copyfile()
succeed anyway? I sure hope not. On Windows,
fdst = open(dst, 'wb')
dies with a (thoroughly appropriate, according to me)
IOError: [Errno 13] Permission denied: <dst_value>
when dst is read-only.
----------------------------------------------------------------------
Comment By: A.M. Kuchling (akuchling)
Date: 2003-09-25 14:37
Message:
Logged In: YES
user_id=11375
There's no uploaded file! You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file.
Please try again.
(This is a SourceForge annoyance that we can do
nothing about. :-( )
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=810879&group_id=5470
More information about the Python-bugs-list
mailing list