diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-06-26 14:29:09 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-06-26 14:29:09 (GMT) |
commit | c6aecaeebebf640810644c2012b9f42530b92157 (patch) | |
tree | 7fadc2a3a6def8b08540df21a17f099f330c5c51 /unix/tclUnixFile.c | |
parent | 7b0a28f1a829ced9359c8eb671fe8f92c284f046 (diff) | |
parent | 6fc2a8b47a08195e3f916039adda4ae7af62fe0a (diff) | |
download | tcl-c6aecaeebebf640810644c2012b9f42530b92157.zip tcl-c6aecaeebebf640810644c2012b9f42530b92157.tar.gz tcl-c6aecaeebebf640810644c2012b9f42530b92157.tar.bz2 |
use cygwin_conv_path() in stead of deprecated cygwin_conv_to_full_posix_path
FossilOrigin-Name: 23aec1435f170c91768f86642ab34552883c7f8e
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r-- | unix/tclUnixFile.c | 7 |
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. */ |