[Issue 3570] New: mkdirRecurse throws exception on trailing empty directory

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 3 16:51:35 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3570

           Summary: mkdirRecurse throws exception on trailing empty
                    directory
           Product: D
           Version: 2.036
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: Jesse.K.Phillips+D at gmail.com


--- Comment #0 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> 2009-12-03 16:51:34 PST ---
If the directory passed to mkdirRecurse ends with a backslash then an exception
when the path provided ends with a backslash.

std.file.FileException: C:\fake\here\: Cannot create a file when that file
already exists.

import std.file;

void main() {
    auto dir = "C:\\fake\\here\\";

    mkdirRecurse(dir);
}

The directories are correctly created. The code below works without throwing an
exception.

import std.file;

void main() {
    auto dir = "C:\\fake\\here";

    mkdirRecurse(dir);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list