Skip to content

Conversation

mattn
Copy link
Member

@mattn mattn commented Oct 5, 2018

Current implementation of executable() return 1 even though it is not an executable. On Windows, executable command must have suffix that contains in PATHEXT. But current implementation check...

  • If it have file extension and the name exists in curdir or PATH.
  • If the filename with appending suffixes exists in curdir or PATH.

So executable('shell32.dll') or executable('win.ini') return 1.

mattn added 3 commits October 5, 2018 13:06
This should work as:

* SearchPath return TRUE with direct name
* File exists with appending extensions contains PATHEXT
@codecov-io
Copy link

Codecov Report

Merging #3512 into master will increase coverage by 0.29%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3512      +/-   ##
==========================================
+ Coverage   76.87%   77.16%   +0.29%     
==========================================
  Files          99       99              
  Lines      136451   139012    +2561     
==========================================
+ Hits       104896   107271    +2375     
- Misses      31555    31741     +186
Impacted Files Coverage Δ
src/xdiff/xemit.c 67.1% <0%> (-1.39%) ⬇️
src/if_python3.c 74.8% <0%> (-1.38%) ⬇️
src/if_python.c 76.55% <0%> (-1.31%) ⬇️
src/spellfile.c 73.97% <0%> (-1.06%) ⬇️
src/xdiff/xpatience.c 89.22% <0%> (-0.59%) ⬇️
src/gui_beval.c 55.02% <0%> (-0.34%) ⬇️
src/gui_gtk_x11.c 47.71% <0%> (-0.33%) ⬇️
src/if_perl.xs 86.12% <0%> (-0.31%) ⬇️
src/netbeans.c 27.03% <0%> (-0.28%) ⬇️
src/libvterm/src/termscreen.c 58.97% <0%> (-0.25%) ⬇️
... and 75 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bc152a...11d9115. Read the comment docs.

@brammool
Copy link
Contributor

brammool commented Oct 5, 2018 via email

@mattn
Copy link
Member Author

mattn commented Oct 6, 2018

If $SHELL is used, the name is used directly.

|| strstr((char *)gettail(p_sh), "sh") != NULL)

@k-takata
Copy link
Member

k-takata commented Oct 6, 2018

Fixed by 8.1.0453.

@k-takata k-takata closed this Oct 6, 2018
@mattn mattn deleted the fix-executable-windows branch October 6, 2018 15:28
@chrisbra
Copy link
Member

chrisbra commented Oct 6, 2018

BTW: did Patch 8.1.0453 also fix #3282 and #3283?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants