Skip to content
Tcl Source Code History Of Ticket 475941ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 475941ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 475941ffffffffffffffffffffffffffffffffff

  1. Ticket change [65236bbbf3] (rid 92902) by petasis on 2001-10-29 09:22:37:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Tcl Version: 8.4a4 (CVS 25 October 2001)
      OS: Unix (and perhaps Windows - untested)
      
      Glob seems to fail to return filenames when the search is done
      in a directory other than the current directory.
      For example, the following script:
      
      set CWD [pwd]
      
      proc TestGlob {dir} {
        puts "Executing \"glob -nocomplain -types {f l r} $dir/*\"..."
        puts [glob -nocomplain -types {f l r} $dir/*]
        puts "Executing \"glob -nocomplain -types {f l r} -directory $dir *\"..."
        puts [glob -nocomplain -types {f l r} -directory $dir *]
        puts {}
      }
      
      TestGlob $CWD
      cd ..
      puts "**** Changing Directory to \"[pwd]\"..."
      TestGlob $CWD
      
      fails to return the file names in the second invocation
      of the TestGlob procedure, after the current directory has been
      changed...
      
    4. foundin initialized to: "obsolete: 8.4a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "petasis"
    9. subsystem initialized to: "37. File System"
    10. title initialized to: "glob not returning filenames..."
    11. type initialized to: "Bug"
  2. Add attachment "GlobBug.tcl" [e612299c79] (rid 104236) by petasis on 2001-10-29 16:22:39.

  3. Ticket change [d72f978c87] (rid 123935) by petasis on 2001-10-29 16:22:39:

    1. icomment:
      
      
      File Added - 12573: GlobBug.tcl
      
      
      
    2. login: "petasis"
    3. mimetype: "text/plain"
    4. username: "petasis"
  4. Ticket change [d36de91d71] (rid 123287) by vincentdarley on 2001-10-29 19:50:22:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      I can see a perhaps-related bug in WinTcl which appeared 
      around a month or so ago in cvs.  Adding these two tests to 
      fileName.test:
      
      test filename-11.25.1 {Tcl_GlobCmd} {
          list [catch {lsort [glob -type {d r} -dir $globname *]} 
      msg] $msg
      } [list 0 [lsort [list [file join $globname a1]\
        [file join $globname a2]\
        [file join $globname a3]]]]
      test filename-11.25.2 {Tcl_GlobCmd} {
          list [catch {lsort [glob -type {d r w} -dir $globname 
      *]} msg] $msg
      } [list 0 [lsort [list [file join $globname a1]\
        [file join $globname a2]\
        [file join $globname a3]]]]
      
      shows up that bug (put the above tests after filename-
      11.25), but, looking at the code, it doesn't seem to be the 
      same as your bug, which I can't reproduce (on Windows).
      
      Can you tell me if your bug above is still shown if you 
      remove the '-types' argument?
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  5. Ticket change [abba87e214] (rid 101168) by petasis on 2001-10-29 20:54:42:

    1. icomment:
      Logged In: YES 
      user_id=92283
      
      No, if you remove the -types argument it works as supposed
      to work...
      
      
    2. login: "petasis"
    3. mimetype: "text/plain"
    4. username: "petasis"
  6. Ticket change [2a75f188a7] (rid 118577) by dkf on 2001-10-29 21:27:10:

    1. assignee changed to: "dkf"
    2. closedate changed to: "2001-10-29T14:27:10"
    3. closer changed to: "dkf"
    4. icomment:
      Logged In: YES 
      user_id=79902
      
      Hah!  Found the problem.  In the Unix TclpMatchInDirectory,
      the access() syscall was being used to verify that types
      matched. Which is good. But it was being called without the
      pathname attached (unlike with stat() and lstat()) so it was
      always checking against the files in the current directory
      and not in the place where the matching was supposed to
      happen. Which was bad (but is fixed now.)
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dkf"