Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 02facc5cbe140eb0506e0eaf7379707ebcb41cb2
Ticket: 1034337fffffffffffffffffffffffffffffffff
recursive file/dir delete broken on OSX
User & Date: nobody on 2004-09-24 21:18:35
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Submitted by: Sue LoVerso, [email protected]
    
    Recursive, forced delete of a directory fails on OSX.
    TraverseUnixTree should be fixed in tclUnixFCmd.c (or a
    macosx-specific version written).  Apple has this to say:
    
    http://docs.info.apple.com/article.html?artnum=107884
    
    There may be other places using that same construct for
    readdir, I didn't look for them.  TraverseUnixTree is
    the one
    affecting me.  This simple script illustrates the problem:
    
    proc x { } {
            set nfiles 250
            puts "Creating $nfiles files"
            file delete -force ./TESTDIR
            file mkdir ./TESTDIR
            for { set i 0 } { $i < $nfiles } { incr i } {
                    file copy ./x.tcl ./TESTDIR/x.tcl.$i
            }
    
            puts "Deleting $nfiles in TESTDIR"
            set stat [catch {file delete -force ./TESTDIR} ret]
            if { $stat != 0 } {
                    puts "Error: stat $stat, ret $ret"
                    set filelist [exec ls ./TESTDIR]
                    puts "FILES: $filelist"
            } else {
                    puts "Delete successful"
            }
    }
    
    Multiple calls to 'file delete -force ./TESTDIR' will
    eventually work.
    
    
    
  4. foundin changed to: "obsolete: 8.4.7"
  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: "37. File System"
  10. title changed to: "recursive file/dir delete broken on OSX"
  11. type changed to: "Bug"