www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 889] New: listdir loops forever

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=889

           Summary: listdir loops forever
           Product: DGCC aka GDC
           Version: 0.21
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: digitalmars-com baysmith.com


This example is from http://www.digitalmars.com/d/phobos/std_file.html under
docs for "void listdir(char[] pathname, bool delegate(DirEntry * de)
callback);"

 import std.stdio;
 import std.file;

 void main(char[][] args)
 {
    bool callback(DirEntry* de)
    {
      if (de.isdir)
        listdir(de.name, &callback);
      else
        writefln(de.name);
      return true;
    }

    listdir(args[1], &callback);
 }


-- 
Jan 26 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=889


dvdfrdmn users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed in svn r75.  Targeted for release 0.22.


-- 
Jan 27 2007