summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-26 14:29:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-26 14:29:09 (GMT)
commit8a2d92c01ec2525c1be745e4ac62a28707bfa819 (patch)
tree7fadc2a3a6def8b08540df21a17f099f330c5c51 /unix/tclUnixFile.c
parent5b2718a49ed67a4ac9378b222b1cab87cf55856b (diff)
parented0df6fdc2fe5089d09dc9c806ceb2fe98a67d89 (diff)
downloadtcl-8a2d92c01ec2525c1be745e4ac62a28707bfa819.zip
tcl-8a2d92c01ec2525c1be745e4ac62a28707bfa819.tar.gz
tcl-8a2d92c01ec2525c1be745e4ac62a28707bfa819.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 edd0d2f..053adee 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. */