Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0bea805e2b6c4142c667d316cd2f557004c15ce4ac3d6e400b8640b5034be890
Ticket: 25a127ccbd1f1e3da8ce7ed058ea7f4f570ece56
Windows: file rename -force onto a read-only file fails since TIP 744
User & Date: serhiy.storchaka on 2026-10-12 11:17:09
Changes

  1. cmimetype changed to: "text/x-fossil-wiki"
  2. comment changed to:
    On Windows, <code>file rename -force</code> onto an existing read-only file fails
    in 9.1 with "permission denied", and the source is not moved. All 8.6 releases
    replace the file, as on Unix.
    <verbatim>
    foreach f {src dst} {close [open $f w]}
    file attributes dst -readonly 1
    file rename -force src dst
    </verbatim>
    TIP 744 ([5e98a389b8]) replaced the rename of the target to a temporary name in
    <code>DoRenameFile()</code> by <code>MoveFileExW(MOVEFILE_REPLACE_EXISTING)</code>,
    which fails for a read-only target. Test fCmd-9.7 covers this, but it was skipped
    everywhere because of the undefined <code>notWine</code> constraint.
    
  3. foundin changed to: "9.1.0"
  4. login: "serhiy.storchaka"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. severity changed to: "Minor"
  8. status changed to: "Open"
  9. submitter changed to: "serhiy.storchaka"
  10. subsystem changed to: "37. File System"
  11. title changed to:
    Windows: file rename -force onto a read-only file fails since TIP 744
    
  12. type changed to: "Bug"