summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-26 14:31:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-26 14:31:02 (GMT)
commit8cf6024cc2a05754981233a71d68a3d0fd1d07ac (patch)
treed9d14949559023cffce9873d2e33742a7b7c13e1 /unix/tclUnixFile.c
parentf38639f6e7af8f724c5401f5c47cdbfb25da03a4 (diff)
parent8a2d92c01ec2525c1be745e4ac62a28707bfa819 (diff)
downloadtcl-8cf6024cc2a05754981233a71d68a3d0fd1d07ac.zip
tcl-8cf6024cc2a05754981233a71d68a3d0fd1d07ac.tar.gz
tcl-8cf6024cc2a05754981233a71d68a3d0fd1d07ac.tar.bz2
use cygwin_conv_path() in stead of deprecated cygwin_conv_to_full_posix_path
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r--unix/tclUnixFile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 1c456a0..0c68d64 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -42,11 +42,10 @@ TclpFindExecutable(
Tcl_Encoding encoding;
#ifdef __CYGWIN__
int length;
- char buf[PATH_MAX * TCL_UTF_MAX + 1];
+ char buf[PATH_MAX * 2];
char name[PATH_MAX * TCL_UTF_MAX + 1];
- GetModuleFileNameW(NULL, name, PATH_MAX);
- WideCharToMultiByte(CP_UTF8, 0, name, -1, buf, PATH_MAX, NULL, NULL);
- cygwin_conv_to_full_posix_path(buf, name);
+ GetModuleFileNameW(NULL, buf, PATH_MAX);
+ cygwin_conv_path(3, buf, name, PATH_MAX);
length = strlen(name);
if ((length > 4) && !strcasecmp(name + length - 4, ".exe")) {
/* Strip '.exe' part. */