This code is superfluous. Windows API does support standard POSIX file separator, so just use standard separator, and there's no problem. It's the same situation as if somebody under Unix wanted to use another separator, say "z", and started to submit patches everywhere. The response one would get though would be that they either can use standard paths, or handle non-standard paths on their own.