Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6f926fb4f9181b83c96ab83aa6791eb5d25a4fb4
Ticket: 2893771fffffffffffffffffffffffffffffffff
file stat fails on locked files on win32
User & Date: patthoyts on 2009-11-07 10:21:21
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    On Windows the page file c:\pagefile.sys is always open and locked. In NativeAccess we try using GetFileAttributes but this will return ERROR_SHARING_VIOLATION and -1, leading Tcl to believe the file does not exist. Similar code is in NativeStat fails for the same reason. So we cannot currently test for the existence or size or mtime for this file. However if we then try FindFirstFile for the pathname we can get this information even though the file is in use.
    The attached patch tries FindFirstFile when GetFIleAttributes fails. GFA is a bit faster on my system than FFF so I prefer to only try this when necessary. I've not checked for the GetLastError() code as well as I don't know if other error codes might still be appropriate for continuing to check using FFF.
    
  4. foundin changed to: "obsolete: 8.6b1"
  5. is_private changed to: "0"
  6. priority changed to: "6"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "patthoyts"
  10. subsystem changed to: "37. File System"
  11. title changed to: "file stat fails on locked files on win32"
  12. type changed to: "Bug"