Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-13
23:33 • Ticket [217864ffff] Win32: file mkdir fails with absolute UNC path status ... artifact: ae3b3bf3c7 user: dgp
2000-10-26
07:59 • Closed ticket [217864ffff]. artifact: 97d60f5b9c user: welch
00:45 • New ticket [217864ffff]. artifact: adb5a76f60 user: nobody

Win32: [file mkdir] fails with absolute UNC path

Closed / Invalid217864ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:45:05
OriginalBugID: 2064 Bug
Version: 8.0.5
SubmitDate: '1999-05-13'
LastModified: '1999-08-12'
Severity: MED
Status: Closed
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 672
OS: Windows NT
OSVersion: 4.0 Build 1381 Service Pack 4
Machine: X86
FixedDate: '2000-10-25'
FixedInVersion: 8.1.1
ClosedDate: '1999-08-12'


Name:
Kevin Kenny

Extensions:
None relevant

CustomShell:
Patch applied from BugID:1693; the patch

Comments:
The problem appears to be related to the 'stat' call in MSVCRTD.DLL
    (I've
    recompiled tcl80d.dll under VC++ 6.0 Service Pack #1).  When the
    TclFileMakeDirsCmd function walks the path name from top to bottom,
    it first tries to stat '\\host\share'.  The 'stat' call returns -1,
    with errno == ENOENT. As a result, the command tries to create a
    directory called '\\host\share', and gets an error return, this time
    with
    errno == EEXIST.  (If credentials have not yet been presented to
    \\host, the error is EACCES instead.)
    
    I'm not sure whether the correct solution would be to use an additional
    stat proc to catch this case, or whether a 'compat/' version of 'stat'
    is needed.  Either way, this appears to be an MSVCRT problem, but
    you know as well as I do the chances of getting *that* fixed.  :-(

ReproducibleScript:
# If \\host\share\dirName is a directory that exists on some host on
    the
    # network, then the command:
    
    file mkdir \\\\host\\share\\dirName\\subDirName
    
    # will fail with the message:
    #   can't create directory "//host/share": file already exists.

ObservedBehavior:
The directory is not created, and the error above is reported.

DesiredBehavior:
The directory should be created.



This was fixed in 8.1.1. 
-- 08/12/1999 hobbs
welch Closed ticket [217864ffff]. [History diff]2000-10-26 07:59:48
dgp Ticket [217864ffff]: 3 changes [History diff]2001-04-13 23:33:54
Log in (anonymous is fine) to add a comment.