So, what it really seems to boil down to is for those filesystems that support doing timestamp updating via FILE_WRITE_ATTRIBUTES (NTFS systems) we should use FILE_WRITE_ATTRIBUTES, and for those that don't (HPFS, etc), they should use GENERIC_WRITE?
Unfortunately, during my brief perusal of MSDN, I didn't see an easy way to determine the file system type. I also see from the message you quoted that ntsec comes into play, but I think it still goes back to the filesystem, since I have ntsec set, and the touch works on my box (using NTFS, on our PDS shares (also running NTFS, I assume), but not on my OS2/HPFS box. On Mon, 07 Feb 2005 18:19:25 +0100, Corinna Vinschen wrote: >On Feb 7 09:34, Mark Paulus wrote: >> Attached is a patch that works to allow me to do a >> touch on my mounted HPFS filesystem. I'm not sure >> about clearcase, or others, but it works on HPFS and >> NTFS. >> >> * times.cc: Use GENERIC_WRITE instead of FILE_WRITE_ATTRIBUTES. >That's reverting a more than three years old patch. Please read >http://cygwin.com/ml/cygwin/2001-08/msg00666.html which explains why >opening with GENERIC_WRITE is not generally a good idea. If you want >to get it working for HPFS or whatever, use the FS flags present in >the local path_conv variable called win32 to conditionalize the call. >Corinna >-- >Corinna Vinschen Please, send mails regarding Cygwin to >Cygwin Project Co-Leader mailto:[email protected] >Red Hat, Inc.
