|
|
3ef2ca |
To: vim_dev@googlegroups.com
|
|
|
3ef2ca |
Subject: Patch 7.4.428
|
|
|
3ef2ca |
Fcc: outbox
|
|
|
3ef2ca |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
3ef2ca |
Mime-Version: 1.0
|
|
|
3ef2ca |
Content-Type: text/plain; charset=UTF-8
|
|
|
3ef2ca |
Content-Transfer-Encoding: 8bit
|
|
|
3ef2ca |
------------
|
|
|
3ef2ca |
|
|
|
3ef2ca |
Patch 7.4.428
|
|
|
3ef2ca |
Problem: executable() may return a wrong result on MS-Windows.
|
|
|
3ef2ca |
Solution: Change the way SearchPath() is called. (Yasuhiro Matsumoto, Ken
|
|
|
3ef2ca |
Takata)
|
|
|
3ef2ca |
Files: src/os_win32.c
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.427/src/os_win32.c 2014-07-09 20:51:04.515583033 +0200
|
|
|
3ef2ca |
--- src/os_win32.c 2014-08-29 17:44:01.782467612 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 1906,1911 ****
|
|
|
3ef2ca |
--- 1906,1913 ----
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
char *dum;
|
|
|
3ef2ca |
char fname[_MAX_PATH];
|
|
|
3ef2ca |
+ char *curpath, *newpath;
|
|
|
3ef2ca |
+ long n;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
#ifdef FEAT_MBYTE
|
|
|
3ef2ca |
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 1913,1923 ****
|
|
|
3ef2ca |
WCHAR *p = enc_to_utf16(name, NULL);
|
|
|
3ef2ca |
WCHAR fnamew[_MAX_PATH];
|
|
|
3ef2ca |
WCHAR *dumw;
|
|
|
3ef2ca |
! long n;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
if (p != NULL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
! n = (long)SearchPathW(NULL, p, NULL, _MAX_PATH, fnamew, &dumw);
|
|
|
3ef2ca |
vim_free(p);
|
|
|
3ef2ca |
if (n > 0 || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
--- 1915,1933 ----
|
|
|
3ef2ca |
WCHAR *p = enc_to_utf16(name, NULL);
|
|
|
3ef2ca |
WCHAR fnamew[_MAX_PATH];
|
|
|
3ef2ca |
WCHAR *dumw;
|
|
|
3ef2ca |
! WCHAR *wcurpath, *wnewpath;
|
|
|
3ef2ca |
|
|
|
3ef2ca |
if (p != NULL)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
! wcurpath = _wgetenv(L"PATH");
|
|
|
3ef2ca |
! wnewpath = (WCHAR*)alloc((unsigned)(wcslen(wcurpath) + 3)
|
|
|
3ef2ca |
! * sizeof(WCHAR));
|
|
|
3ef2ca |
! if (wnewpath == NULL)
|
|
|
3ef2ca |
! return FALSE;
|
|
|
3ef2ca |
! wcscpy(wnewpath, L".;");
|
|
|
3ef2ca |
! wcscat(wnewpath, wcurpath);
|
|
|
3ef2ca |
! n = (long)SearchPathW(wnewpath, p, NULL, _MAX_PATH, fnamew, &dumw);
|
|
|
3ef2ca |
! vim_free(wnewpath);
|
|
|
3ef2ca |
vim_free(p);
|
|
|
3ef2ca |
if (n > 0 || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
|
|
|
3ef2ca |
{
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 1933,1939 ****
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
! if (SearchPath(NULL, name, NULL, _MAX_PATH, fname, &dum) == 0)
|
|
|
3ef2ca |
return FALSE;
|
|
|
3ef2ca |
if (mch_isdir(fname))
|
|
|
3ef2ca |
return FALSE;
|
|
|
3ef2ca |
--- 1943,1958 ----
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
#endif
|
|
|
3ef2ca |
!
|
|
|
3ef2ca |
! curpath = getenv("PATH");
|
|
|
3ef2ca |
! newpath = (char*)alloc((unsigned)(STRLEN(curpath) + 3));
|
|
|
3ef2ca |
! if (newpath == NULL)
|
|
|
3ef2ca |
! return FALSE;
|
|
|
3ef2ca |
! STRCPY(newpath, ".;");
|
|
|
3ef2ca |
! STRCAT(newpath, curpath);
|
|
|
3ef2ca |
! n = (long)SearchPath(newpath, name, NULL, _MAX_PATH, fname, &dum;;
|
|
|
3ef2ca |
! vim_free(newpath);
|
|
|
3ef2ca |
! if (n == 0)
|
|
|
3ef2ca |
return FALSE;
|
|
|
3ef2ca |
if (mch_isdir(fname))
|
|
|
3ef2ca |
return FALSE;
|
|
|
3ef2ca |
*** ../vim-7.4.427/src/version.c 2014-08-29 15:53:43.714453155 +0200
|
|
|
3ef2ca |
--- src/version.c 2014-08-29 17:44:50.598467718 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 743,744 ****
|
|
|
3ef2ca |
--- 743,746 ----
|
|
|
3ef2ca |
{ /* Add new patch number below this line */
|
|
|
3ef2ca |
+ /**/
|
|
|
3ef2ca |
+ 428,
|
|
|
3ef2ca |
/**/
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--
|
|
|
3ef2ca |
You are only young once, but you can stay immature indefinitely.
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
3ef2ca |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
3ef2ca |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
3ef2ca |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|