diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-10-31 09:59:36 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-10-31 09:59:36 (GMT) |
| commit | 476a68cbe549a2c2b03a9bd89d3e59dae94fc2a4 (patch) | |
| tree | 99965f2ae63150e2f2827340e4c3e6d975e27609 | |
| parent | 999c88ea06627d4c3dc57cb5f588cdd136622682 (diff) | |
| download | tcl-476a68cbe549a2c2b03a9bd89d3e59dae94fc2a4.zip tcl-476a68cbe549a2c2b03a9bd89d3e59dae94fc2a4.tar.gz tcl-476a68cbe549a2c2b03a9bd89d3e59dae94fc2a4.tar.bz2 | |
When translating a reserved devicename to native pathname, strip ':' postfix. Possible fix for [dcc03414f5], but anyway a good idea.
| -rw-r--r-- | win/tclWinFile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 9bf63b1..163050e 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -3203,7 +3203,10 @@ TclNativeCreateNativeRep( Tcl_WinUtfToTChar(str, len, &ds); if (tclWinProcs->useWide) { WCHAR *wp = (WCHAR *) Tcl_DStringValue(&ds); - len = Tcl_DStringLength(&ds)>>1; + /* For a reserved device, strip a possible postfix ':' */ + len = WinIsReserved(str); + /* For normal devices */ + if (len == 0) len = Tcl_DStringLength(&ds)>>1; /* ** If path starts with "//?/" or "\\?\" (extended path), translate ** any slashes to backslashes but accept the '?' as being valid. |
