File append limit?

Joshua Niehus jm.niehus at gmail.com
Fri Aug 5 08:35:33 PDT 2011


Hello,

I am running a script that creates a file which lists all the folders in a
directory:

    foreach (string name; dirEntries("/Users/josh/", SpanMode.shallow)) {
        append("/Users/dirList.txt", name ~ "\n");
    }

But it seems to stop appending after 255 lines (this particular folder has
350 folders in all).
When trying to read the created file:

   auto f = File("/Users/dirList.txt", "r");
   foreach (string line; lines(f)) {
       writeln(line);
   }
   f.close();

It writes out the lines, but after the last one I get "Bus error: 10"

Any thoughts on what im missing or doing wrong?

I am currently using D 2.054 on Mac OSX Lion
The script was working with D 2.053 on Mac OSX Snow Leopard

Thanks,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20110805/7d8dac86/attachment.html>


More information about the Digitalmars-d-learn mailing list