Mercurial > vim
comparison src/os_unix.c @ 11054:576238eda5a4 v8.0.0416
patch 8.0.0416: setting v:progpath is not quite right
commit https://github.com/vim/vim/commit/436631969716e056feca47480976100b70283370
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 5 14:29:12 2017 +0100
patch 8.0.0416: setting v:progpath is not quite right
Problem: Setting v:progpath is not quite right.
Solution: On MS-Windows add the extension. On Unix use the full path for a
relative directory. (partly by James McCoy, closes #1531)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 05 Mar 2017 14:30:04 +0100 |
parents | fb2bcfa6a8de |
children | 3b36da20ad73 |
comparison
equal
deleted
inserted
replaced
11053:f45fc115b687 | 11054:576238eda5a4 |
---|---|
3101 * can't be executed. */ | 3101 * can't be executed. */ |
3102 if (gettail(name) != name && executable_file(name)) | 3102 if (gettail(name) != name && executable_file(name)) |
3103 { | 3103 { |
3104 if (path != NULL) | 3104 if (path != NULL) |
3105 { | 3105 { |
3106 if (name[0] == '.') | 3106 if (name[0] != '/') |
3107 *path = FullName_save(name, TRUE); | 3107 *path = FullName_save(name, TRUE); |
3108 else | 3108 else |
3109 *path = vim_strsave(name); | 3109 *path = vim_strsave(name); |
3110 } | 3110 } |
3111 return TRUE; | 3111 return TRUE; |
3140 retval = executable_file(buf); | 3140 retval = executable_file(buf); |
3141 if (retval == 1) | 3141 if (retval == 1) |
3142 { | 3142 { |
3143 if (path != NULL) | 3143 if (path != NULL) |
3144 { | 3144 { |
3145 if (buf[0] == '.') | 3145 if (buf[0] != '/') |
3146 *path = FullName_save(buf, TRUE); | 3146 *path = FullName_save(buf, TRUE); |
3147 else | 3147 else |
3148 *path = vim_strsave(buf); | 3148 *path = vim_strsave(buf); |
3149 } | 3149 } |
3150 break; | 3150 break; |