Lisp HUG Maillist Archive

(LWW 5.1) set-file-dates

Unable to parse email body. Email id is 8179

Re: (LWW 5.1) set-file-dates

I think the problem is that the file was opened was CreateFile, but only "Read Attributes" were specified, and according to SetFileTime:

http://msdn.microsoft.com/en-us/library/ms724933(VS.85).aspx

A handle to the file or directory. The handle must have been created using the CreateFile function with the FILE_WRITE_ATTRIBUTES access right. For more information, see File Security and Access Rights.

To check that this is the case, you can use the wonderful Mark Russinovich's PROCMON (www.SysInternals.com).

Do a filter (Ctrl+L) to the ProcessName that CONTAINS the "lispworks" word, and then start capturing - CTRL+E.

You would see the following:

98289    7:46:14.0876067 PM    lispworks-5-0-0-x86-win32.exe    4792    QueryOpen    D:\LW\.lispworks    SUCCESS    CreationTime: 2/5/2007 5:17:54 PM, LastAccessTime: 10/9/2007 9:31:03 AM, LastWriteTime: 3/6/2007 12:25:54 PM, ChangeTime: 5/27/2008 12:12:43 PM, AllocationSize: 280, EndOfFile: 279, FileAttributes: AC
98291    7:46:14.0877132 PM    lispworks-5-0-0-x86-win32.exe    4792    QueryOpen    D:\LW\.lispworks    SUCCESS    CreationTime: 2/5/2007 5:17:54 PM, LastAccessTime: 10/9/2007 9:31:03 AM, LastWriteTime: 3/6/2007 12:25:54 PM, ChangeTime: 5/27/2008 12:12:43 PM, AllocationSize: 280, EndOfFile: 279, FileAttributes: AC
98292    7:46:14.0878478 PM    lispworks-5-0-0-x86-win32.exe    4792    CreateFile    D:\LW\.lispworks    SUCCESS    Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
98294    7:46:14.0879616 PM    lispworks-5-0-0-x86-win32.exe    4792    CreateFile    D:\LW\.lispworks    SUCCESS    Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Complete If Oplocked, Random Access, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
98295    7:46:14.0880920 PM    lispworks-5-0-0-x86-win32.exe    4792    CreateFile    D:\LW    SUCCESS    Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
98296    7:46:14.0881311 PM    lispworks-5-0-0-x86-win32.exe    4792    QueryDirectory    D:\LW\lispworks-5-0-0-x86-win32.exe    SUCCESS    Filter: lispworks-5-0-0-x86-win32.exe, 1: lispworks-5-0-0-x86-win32.exe
98298    7:46:14.0881696 PM    lispworks-5-0-0-x86-win32.exe    4792    CloseFile    D:\LW    SUCCESS   
98299    7:46:14.0881829 PM    lispworks-5-0-0-x86-win32.exe    4792    IRP_MJ_CLOSE    D:\LW    SUCCESS   
98301    7:46:14.0882216 PM    lispworks-5-0-0-x86-win32.exe    4792    QueryFileInternalInformationFile    D:\LW\.lispworks    SUCCESS    IndexNumber: 0x10000000cd079
98302    7:46:14.0882354 PM    lispworks-5-0-0-x86-win32.exe    4792    QueryStandardInformationFile    D:\LW\.lispworks    SUCCESS    AllocationSize: 280, EndOfFile: 279, NumberOfLinks: 1, DeletePending: False, Directory: False
98303    7:46:14.0882587 PM    lispworks-5-0-0-x86-win32.exe    4792    CloseFile    D:\LW\.lispworks    SUCCESS   
98304    7:46:14.0882708 PM    lispworks-5-0-0-x86-win32.exe    4792    IRP_MJ_CLOSE    D:\LW\.lispworks    SUCCESS   
98305    7:46:14.0883787 PM    lispworks-5-0-0-x86-win32.exe    4792    CreateFile    D:\LW    SUCCESS    Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
98306    7:46:14.0883994 PM    lispworks-5-0-0-x86-win32.exe    4792    QueryDirectory    D:\LW\lispworks-5-0-0-x86-win32.exe    SUCCESS    Filter: lispworks-5-0-0-x86-win32.exe, 1: lispworks-5-0-0-x86-win32.exe
98307    7:46:14.0884210 PM    lispworks-5-0-0-x86-win32.exe    4792    CloseFile    D:\LW    SUCCESS   
98308    7:46:14.0884313 PM    lispworks-5-0-0-x86-win32.exe    4792    IRP_MJ_CLOSE    D:\LW    SUCCESS   
98311    7:46:14.0884752 PM    lispworks-5-0-0-x86-win32.exe    4792    CloseFile    D:\LW\.lispworks    SUCCESS   
98312    7:46:14.0884884 PM    lispworks-5-0-0-x86-win32.exe    4792    IRP_MJ_CLOSE    D:\LW\.lispworks    SUCCESS   


On Thu, Jun 5, 2008 at 9:14 AM, Nick Levine <ndl@ravenbrook.com> wrote:

Is there some trick to this?

I can't get it to work:

   (sys:set-file-dates (truename "C:/home/nick/.lispworks")
                       :modification (get-universal-time))

   Error: Failed to SET-FILE-DATES file C:\home\nick\.lispworks: Access
   is denied.(5).

The OS, fwiw, is Windows XP SP2.

Anyone know anything about this?

Thanks,

- nick




--
Dimiter "malkia" Stanev,
ICQ: 21875894
malkia@mac.com
malkia@gmail.com
Updated at: 2020-12-10 08:43 UTC