-
Notifications
You must be signed in to change notification settings - Fork 316
Do not use _wfopen() for DOS device filenames #111
Conversation
It appears that CONIN$ can be opened correctly by fopen(), but not _wfopen() (with "CONIN$" passed in the correct format, of course). Reported by Ray Kolbe. It was also reported in msysgit/msysgit#153, for some definition of "reported": it was not only reported to the wrong repository but also so incomplete as to be contemptous of the time of the people asked for help. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
MSysGit - the development behind Git for Windows » git #158 SUCCESS |
@sschuberth it does work with So even while that list is ugly (which is only the failure of the Win32 API to provide a function to query the list of reserved DOS device names), I am really hesitant to replace a functional, small work-around by an unwieldy, time-consuming and fragile bigger work-around. |
Do not use _wfopen() for DOS device filenames
I merged this with the intent of fixing the bug in the short run, and if it is too ugly (or too unmaintainable) dropping it in a future revision in favor of a cleaner solution. |
@dscho We wouldn't need to overload all functions operating on FILE-pointers, we only need to |
@kusma well, if we overload the |
The culprit seems to be GetFullPathNameW converting CONIN$ to an absolute path (i.e. "C:\whatever\CONIN$"). I'd prefer to revert #86 instead of adding more workarounds. |
@sschuberth I agree. Maybe we give @vangdfang a chance to speak up before that? |
It appears that CONIN$ can be opened correctly by fopen(), but not
_wfopen() (with "CONIN$" passed in the correct format, of course).
Reported by Ray Kolbe.
It was also reported in msysgit/msysgit#153, for
some definition of "reported": it was not only reported to the wrong
repository but also so incomplete as to be contemptous of the time of the
people asked for help.
Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de