1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: add .cmd to the list of Windows executable suffixes (#14839)

This commit is contained in:
Wertzui123 2022-06-23 19:12:29 +02:00 committed by GitHub
parent b0fe21f018
commit c10ba6d81a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -404,7 +404,7 @@ pub fn is_executable(path string) bool {
// 04 Read-only // 04 Read-only
// 06 Read and write // 06 Read and write
p := real_path(path) p := real_path(path)
return exists(p) && (p.ends_with('.exe') || p.ends_with('.bat')) return exists(p) && (p.ends_with('.exe') || p.ends_with('.bat') || p.ends_with('.cmd'))
} }
$if solaris { $if solaris {
statbuf := C.stat{} statbuf := C.stat{}

View File

@ -14,7 +14,7 @@ fn C.CreateHardLinkW(&u16, &u16, C.SECURITY_ATTRIBUTES) int
fn C._getpid() int fn C._getpid() int
const executable_suffixes = ['.exe', '.bat', ''] const executable_suffixes = ['.exe', '.bat', '.cmd', '']
pub const ( pub const (
path_separator = '\\' path_separator = '\\'