Issue 7858: os.utime(file, (0,0,)) fails on on vfat, but doesn't fail immediately (original) (raw)

Created on 2010-02-05 16:07 by Damien.Elmes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
win_utime.patch pitrou,2010-02-05 17:26
win_utime_updated.patch lambacck,2010-11-21 03:07 Updated patch to apply to current py3k branch.
Messages (5)
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 "", line 1, in WindowsError: [Error 87] The parameter is incorrect
msg98887 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) 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!
msg121846 - (view) Author: Chris Lambacher (lambacck) * Date: 2010-11-21 03:07
win_utime.patch does not apply cleanly on the py3k branch. Adapted, as in the attached win_utime_updated.patch, the solution does fix the problem. I have not added a test because I don't know how to deal with the fat32 requirement in order to cause failure, though I did test before and after applying the test on fat32 locally.
msg125577 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-06 18:31
Committed in r87802 (3.2), r87803 (3.1) and r87804 (2.7). Will watch the buildbots.
History
Date User Action Args
2022-04-11 14:56:57 admin set github: 52106
2011-01-06 20:07:37 pitrou set status: pending -> closednosy:pitrou, lambacck, Damien.Elmes
2011-01-06 18:31:31 pitrou set status: open -> pendingversions: - Python 2.6nosy:pitrou, lambacck, Damien.Elmesmessages: + resolution: fixedstage: needs patch -> resolved
2010-11-21 03:07:52 lambacck set files: + win_utime_updated.patchnosy: + lambacckmessages: +
2010-02-05 17:33:30 Damien.Elmes set messages: +
2010-02-05 17:26:59 pitrou set files: + win_utime.patchpriority: normaltype: behaviorversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5keywords: + patchnosy: + pitroumessages: + stage: needs patch
2010-02-05 16:07:37 Damien.Elmes create