Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4099e54847f482010cbe3dd29ca53d7cf3a74077
Ticket: 2710920fffffffffffffffffffffffffffffffff
[file tail] gives wrong result
User & Date: jepler on 2009-03-25 10:07:16
Changes

  1. icomment:
    I am not familiar with the tcl path object, but I attempted to generate some useful debugging information.  I found that the 'normPathPtr' is an empty string, and that TclPathpart returns normPathPtr, leading to the result I am seeing.  Perhaps the problem is occurring earlier at the point where this path object is constructed?
    
    Breakpoint 3, TclPathPart (interp=0x606400, pathPtr=0x62aa00, 
        portion=TCL_PATH_TAIL) at /tmp/tcl8.5.6/unix/../generic/tclPathObj.c:596
    596const char *rest = TclGetString(fsPathPtr->normPathPtr);
    (gdb) print fsPathPtr->translatedPathPtr->bytes
    $32 = 0x636be0 "/bin"
    (gdb) print fsPathPtr->normPathPtr->bytes
    $33 = 0x7f2ed6902b48 ""
    (gdb) next
    598if (strchr(rest, '/') != NULL) {
    (gdb) 
    601if (tclPlatform == TCL_PLATFORM_WINDOWS
    (gdb) 
    605Tcl_IncrRefCount(fsPathPtr->normPathPtr);
    (gdb) 
    606return fsPathPtr->normPathPtr;
    (gdb) 
    747}
    (gdb) 
    
    
    
  2. login: "jepler"
  3. mimetype: "text/plain"
  4. username: "jepler"