| Ticket UUID: | 1219176 | ||
| Title: | file mkdir fails on existing directories | ||
| Type: | Bug | Created on: | 2005-06-12 14:25:10 |
| Submitter: | tngd | Assigned to: | vincentdarley |
| Subsystem: | 37. File System | Severity: | |
| Priority: | 5 Medium | Last modified: | 2005-06-13 15:32:25 |
| Status: | Closed | Closed by: | vincentdarley |
| Resolution: | Fixed | Closed on: | 2005-06-13 08:32:25 |
| Version: | obsolete: 8.5a4 | ||
| Description: | ||||
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. | ||||
| User Comments: | ||||
tngd added on 2005-06-12 21:25:10:
File Added - 138093: tclFCmd.c.diff vincentdarley added on 2005-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. | ||||
Attachments:
- tclFCmd.c.diff [download] added by tngd on 2005-06-12 21:25:10. [details]
