os: add `.cmd` to the list of Windows executable suffixes (#14839)
							parent
							
								
									b0fe21f018
								
							
						
					
					
						commit
						c10ba6d81a
					
				|  | @ -404,7 +404,7 @@ pub fn is_executable(path string) bool { | |||
| 		// 04 Read-only
 | ||||
| 		// 06 Read and write
 | ||||
| 		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 { | ||||
| 		statbuf := C.stat{} | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ fn C.CreateHardLinkW(&u16, &u16, C.SECURITY_ATTRIBUTES) int | |||
| 
 | ||||
| fn C._getpid() int | ||||
| 
 | ||||
| const executable_suffixes = ['.exe', '.bat', ''] | ||||
| const executable_suffixes = ['.exe', '.bat', '.cmd', ''] | ||||
| 
 | ||||
| pub const ( | ||||
| 	path_separator = '\\' | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue