file mkdir fails on existing directories
Closed / Fixed1219176fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 21 years ago
Descriptionplain2005-06-12 14:25:10
System: WinXP, Tcl/Tk 8.5 CVS (current), Mingw gcc 3.4.2 i get these problems when creating absolute directories: % file mkdir . <-- no error here % file mkdir c:/ can't create directory "c:/": permission denied % file mkdir c:/windows can't create directory "c:/": permission denied % file mkdir c:/w can't create directory "c:/": permission denied % file mkdir /home can't create directory "/": permission denied In function TclFileMakeDirsCmd (tclFCmd.c:222) it checks if the destination target exists, and if it is not a directory, it will attempt to create it. But, if it does exist and is a directory it will still call Tcl_FSCreateDirectory. patch is attached with proposed fix (which seems reasonable to me). I havent tested it on other platforms (no idea if it has any impact on symlinks since i did not look inside function Tcl_FSCreateDirectory.
tngdplain2005-06-12 21:25:10
File Added - 138093: tclFCmd.c.diff
vincentdarleyplain2005-06-13 15:32:25
Logged In: YES user_id=32170 Fixed this, and made sure tests pass correctly. Also added more comments so code paths are clearer.
Log in (anonymous is fine) to add a comment.
Attachments:
- tclFCmd.c.diff [download] added by tngd on 2005-06-12 21:25:10. [details]