Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 346254f97cb0c23a79a22c4a1fe99eb65715cdb1
Ticket: 1219176fffffffffffffffffffffffffffffffff
file mkdir fails on existing directories
User & Date: tngd on 2005-06-12 14:25:10
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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.
    
  4. foundin changed to: "obsolete: 8.5a4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "tngd"
  9. subsystem changed to: "37. File System"
  10. title changed to: "file mkdir fails on existing directories"
  11. type changed to: "Bug"