D-Programming-Language/phobos — pull request #2558 by tom-tan (2014-09-26 08:48:31+00:00)
Title: Make std.file.chdir safe

It contains the following unsafe operations but we can verify that they can be trusted.

On Windows systems:
- use of unsafe functions `core.sys.windows.windows.SetCurrentDirectoryW` and `std.internal.cstring.tempCStringW`.

On Posix systems:
- use of unsafe functions `core.sys.posix.unistd.chdir` and `std.internal.cstring.tempCString`

Additionally, I replaced `enforce` with `cenforce` to obtain error information on Windows systems.