Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8262bc94d77116fccf924c427c076436eccc8d4a
Ticket: 218562ffffffffffffffffffffffffffffffffff
file extension bug
User & Date: nobody on 2000-10-26 01:02:19
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1126 Bug
    Version: 8.0.4
    SubmitDate: '1999-01-29'
    LastModified: '1999-02-03'
    Severity: MED
    Status: Released
    Submitter: welch
    ChangedBy: stanton
    OS: Solaris
    OSVersion: SunOS muffin 5.6 Generic sun4m sparc SUNW,SPARCstation-20
    Machine: Other
    FixedDate: '1999-02-03'
    FixedInVersion: 8.0.5
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Don Libes
    
    
    CVS:
    
    RCS: @(#) $Id: tclFileName.c,v 1.3 1998/09/14 18:39:59 stanton Exp $
    
    
    Extensions:
    
    Tcl 8.0.4
    
    
    ReproducibleScript:
    
    Enter the following to the Tcl interpreter:
    
       file extension a..b
    
    
    ObservedBehavior:
    
    [file extension a..b]
    
      returns "..b"
    
    
    DesiredBehavior:
    
    [file extension a..b]
    
      should return ".b"
    
    
    Not only is this more intuitive, but the man page says that's how it should work.
    
    
    Oddly, Tcl contains code specifically for this behavior:
    
         /*
    
          * Back up to the first period in a series of contiguous dots.
    
          * This is needed so foo..o will be split on the first dot.
    
          */
    
     Why on earth would anyone want this behavior?  The comment isn't
    
    very clear - to restate, it means that the extension of foo..o is
    
    "..o".  This is inconsistent.  It means that "foo..o" and "foo.x.o"
    
    are files with different extensions.
    
    
    Patch:
    
    *** tclFileName.c~Mon Sep 14 14:39:59 1998
    
    --- tclFileName.cTue Jan 26 14:27:32 1999
    
    ***************
    
    *** 1029,1045 ****
    
          && (lastSep > p)) {
    
      p = NULL;
    
          }
    
    - 
    
    -     /*
    
    -      * Back up to the first period in a series of contiguous dots.
    
    -      * This is needed so foo..o will be split on the first dot.
    
    -      */
    
    - 
    
    -     if (p != NULL) {
    
    - while ((p > name) && *(p-1) == '.') {
    
    -     p--;
    
    - }
    
    -     }
    
          return p;
    
      }
    
      
    
    --- 1029,1034 ----
    
    
    PatchFiles:
    
    tclFileName.c
    
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.0.4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "file extension bug"
  11. type changed to: "Bug"