classification
Title: os.utime(file, (0,0,)) fails on on vfat, but doesn't fail immediately
Type: behavior Stage: needs patch
Components: Versions: Python 3.2, Python 3.1, Python 2.7, Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Damien.Elmes, pitrou
Priority: normal Keywords: patch

Created on 2010-02-05 16:07 by Damien.Elmes, last changed 2010-02-05 17:33 by Damien.Elmes.

Files
File name Uploaded Description Edit Remove
win_utime.patch pitrou, 2010-02-05 17:26
Messages (3)
msg98879 - (view) Author: Damien Elmes (Damien.Elmes) Date: 2010-02-05 16:07
It seems like you can't set a modtime of 0 on a vfat partition. This may not be a valid thing to do, but it took me a long time to figure out it was a bad thing, as the error doesn't appear until the next time the error flag is checked:

>>> os.utime("testfile", (0.0,0.0))
>>> import time
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
WindowsError: [Error 87] The parameter is incorrect
msg98887 - (view) Author: Antoine Pitrou (pitrou) Date: 2010-02-05 17:26
Looks like a missing "goto done" in posix_utime(), posixmodule.c, line 2805. Could you test the following patch?
msg98888 - (view) Author: Damien Elmes (Damien.Elmes) Date: 2010-02-05 17:33
I'm afraid I don't have a Windows build environment handy, but a quick look at the function in question seems to indicate that is the problem. Thanks for the quick reply!
History
Date User Action Args
2010-02-05 17:33:30Damien.Elmessetmessages: + msg98888
2010-02-05 17:26:59pitrousetfiles: + win_utime.patch


nosy: + pitrou
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5
messages: + msg98887
priority: normal
keywords: + patch
type: behavior
stage: needs patch
2010-02-05 16:07:37Damien.Elmescreate