Skip to content
Tcl Source Code Artifact [0bea805e2b]
Login

Artifact [0bea805e2b]

Artifact 0bea805e2b6c4142c667d316cd2f557004c15ce4ac3d6e400b8640b5034be890:

Ticket change [0bea805e2b] - New ticket [25a127ccbd1f1e3d|25a127ccbd] <i>Windows: file rename -force onto a read-only file fails since TIP 744</i>. by serhiy.storchaka on 2026-10-12 11:17:09.
D 2026-10-12T11:17:09.333
J cmimetype text/x-fossil-wiki
J comment On\sWindows,\s<code>file\srename\s-force</code>\sonto\san\sexisting\sread-only\sfile\sfails\nin\s9.1\swith\s"permission\sdenied",\sand\sthe\ssource\sis\snot\smoved.\sAll\s8.6\sreleases\nreplace\sthe\sfile,\sas\son\sUnix.\n<verbatim>\nforeach\sf\s{src\sdst}\s{close\s[open\s$f\sw]}\nfile\sattributes\sdst\s-readonly\s1\nfile\srename\s-force\ssrc\sdst\n</verbatim>\nTIP\s744\s([5e98a389b8])\sreplaced\sthe\srename\sof\sthe\starget\sto\sa\stemporary\sname\sin\n<code>DoRenameFile()</code>\sby\s<code>MoveFileExW(MOVEFILE_REPLACE_EXISTING)</code>,\nwhich\sfails\sfor\sa\sread-only\starget.\sTest\sfCmd-9.7\scovers\sthis,\sbut\sit\swas\sskipped\neverywhere\sbecause\sof\sthe\sundefined\s<code>notWine</code>\sconstraint.
J foundin 9.1.0
J login serhiy.storchaka
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter serhiy.storchaka
J subsystem 37.\sFile\sSystem
J title Windows:\sfile\srename\s-force\sonto\sa\sread-only\sfile\sfails\ssince\sTIP\s744
J type Bug
K 25a127ccbd1f1e3da8ce7ed058ea7f4f570ece56
U serhiy.storchaka
Z 0710073ff51ca74b248a05f811b74fcd