https://issues.dlang.org/show_bug.cgi?id=21657
Issue ID: 21657 Summary: MmFile cannot map empty files Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nob...@puremagic.com Reporter: deadal...@gmail.com First, let's create an empty file: $ touch me Now let's run the following sample code: int main(string[]) { import std.mmfile; scope f = new MmFile("me"); return 0; } It fails with the following error: std.exception.ErrnoException@std/mmfile.d(351): Could not map file me (Invalid argument) Now, let's add some content to our file $ echo love > me Running the program again now works as expected. --