File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,7 @@ const char* ffFindExecutableInPath(const char* name, FFstrbuf* result)
3838 if (!ffPathExists (result -> chars , FF_PATHTYPE_FILE ))
3939 continue ;
4040 #else
41- struct stat st ;
42- if (stat (result -> chars , & st ) < 0 || !(st .st_mode & S_IXUSR ))
41+ if (access (result -> chars , X_OK ) != 0 )
4342 continue ;
4443 #endif
4544
@@ -52,7 +51,8 @@ const char* ffFindExecutableInPath(const char* name, FFstrbuf* result)
5251bool ffIsAbsolutePath (const char * path )
5352{
5453 #ifdef _WIN32
55- return ffCharIsEnglishAlphabet (path [0 ]) && path [1 ] == ':' && (path [2 ] == '\\' || path [2 ] == '/' );
54+ return (ffCharIsEnglishAlphabet (path [0 ]) && path [1 ] == ':' && (path [2 ] == '\\' || path [2 ] == '/' )) // drive letter path
55+ || (path [0 ] == '\\' && path [1 ] == '\\' ); // UNC path
5656 #else
5757 return path [0 ] == '/' ;
5858 #endif
You can’t perform that action at this time.
0 commit comments