Possible bug in std.file.listdir (Linux)

Timo Gransch timo at gransch.de
Wed Jan 31 13:47:05 PST 2007


Hi!

Maybe I'm wrong, but I think I discovered a bug in std.file.listdir.

-- [snip] --

import std.file;
import std.path;
import std.stdio;

int main(char[][] args)
{
        char Files[][]=listdir(curdir);
        
        foreach(char File[]; Files)
        {
                writefln(File);
        }

        return 0;
}

-- [snip] --

This works fine unless there is a file with a '%' in it's name in the
current folder. If I put a file called for example "now_i_test%dmd" there,
the program prints

now_i_testError: std.format

and exits.

I have only tested it on Linux (Ubuntu 6.10 x86).

Best regards,
Timo




More information about the Digitalmars-d-bugs mailing list