Skip to content
Snippets Groups Projects
Commit 32841dac authored by rswindell's avatar rswindell
Browse files

Unix fexist() uses new lastchar() function.

parent 28c97a8c
No related branches found
No related tags found
No related merge requests found
......@@ -348,7 +348,6 @@ BOOL DLLCALL fexist(const char *filespec)
glob_t g;
int c;
int l;
if(access(filespec,0)==-1 && !strchr(filespec,'*') && !strchr(filespec,'?'))
return(FALSE);
......@@ -365,8 +364,7 @@ BOOL DLLCALL fexist(const char *filespec)
// make sure it's not a directory
c = g.gl_pathc;
while (c--) {
l = strlen(g.gl_pathv[c]);
if (l && g.gl_pathv[c][l-1] != '/') {
if (lastchar(g.gl_pathv[c]) != '/') {
globfree(&g);
return TRUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment