Message24358
Hi,
The shutil.copystat() may fail in case when the
destination file has read-only attribute. It's because the
implementation calls the os.utime() first and os.chmod()
later. In Windows (I am not sure if also in Unix-based
system), the os.utime() fails for read-only files.
The implementation should ensure the read/write access
by " try: os.chmod(dst, 0600)..." before calling the
os.utime(). The file mode will be copied from the source
file in the next step anyway. The simplistic test
attached (Unix line ending used inside the tst.py zipped
inside).
Petr |
|
Date |
User |
Action |
Args |
2007-08-23 14:29:39 | admin | link | issue1145257 messages |
2007-08-23 14:29:39 | admin | create | |
|