1
0
forked from aniani/vim

patch 8.2.4875: MS-Windows: some .exe files are not recognized

Problem:    MS-Windows: some .exe files are not recognized.
Solution:   Parse APPEXECLINK junctions. (closes #10302)
This commit is contained in:
LemonBoy
2022-05-05 20:18:16 +01:00
committed by Bram Moolenaar
parent 365d8f76b5
commit 40fd7e6652
6 changed files with 158 additions and 4 deletions

View File

@@ -1398,6 +1398,28 @@ func Test_Executable()
endif
endfunc
func Test_executable_windows_store_apps()
CheckMSWindows
" Windows Store apps install some 'decoy' .exe that require some careful
" handling as they behave similarly to symlinks.
let app_dir = expand("$LOCALAPPDATA\\Microsoft\\WindowsApps")
if !isdirectory(app_dir)
return
endif
let save_path = $PATH
let $PATH = app_dir
" Ensure executable() finds all the app .exes
for entry in readdir(app_dir)
if entry =~ '\.exe$'
call assert_true(executable(entry))
endif
endfor
let $PATH = save_path
endfunc
func Test_executable_longname()
CheckMSWindows