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); }
Fixed in the svn trunk r2104.