summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-05-16 14:47:15 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-05-16 14:47:15 (GMT)
commit6f8a00dcd5a10e71caf9e3d2f7067523c4ff0b28 (patch)
tree7d22c170916773ed8248dc5d4b42f9caaa291baf /win/tclWinFile.c
parent4830ed53a3b546ff699230e332c0a6d4fecf5a24 (diff)
parenteb476fdf9350b70cf8ab1ec90ad848dec9d1b75b (diff)
downloadtcl-6f8a00dcd5a10e71caf9e3d2f7067523c4ff0b28.zip
tcl-6f8a00dcd5a10e71caf9e3d2f7067523c4ff0b28.tar.gz
tcl-6f8a00dcd5a10e71caf9e3d2f7067523c4ff0b28.tar.bz2
Merge completion of dgp-read-bytes branch.
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 676c443..ed0c40f 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -3197,17 +3197,14 @@ TclNativeCreateNativeRep(
}
str = Tcl_GetStringFromObj(validPathPtr, &len);
- if (str[0] == '/' && str[1] == '/' && str[2] == '?' && str[3] == '/') {
- char *p;
-
- for (p = str; p && *p; ++p) {
- if (*p == '/') {
- *p = '\\';
- }
- }
- }
Tcl_WinUtfToTChar(str, len, &ds);
if (tclWinProcs->useWide) {
+ WCHAR *wp = (WCHAR *) Tcl_DStringValue(&ds);
+ for (; *wp; ++wp) {
+ if (*wp=='/') {
+ *wp = '\\';
+ }
+ }
len = Tcl_DStringLength(&ds) + sizeof(WCHAR);
} else {
len = Tcl_DStringLength(&ds) + sizeof(char);