Skip to content

Commit

Permalink
Only search for backslash in filename on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmf01 committed Jul 13, 2022
1 parent 772efde commit 43a93a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/share/grabbag/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ const char *grabbag__file_get_basename(const char *srcpath)

p = strrchr(srcpath, '/');
if(0 == p) {
#if defined _WIN32 && !defined __CYGWIN__
p = strrchr(srcpath, '\\');
if(0 == p)
#endif
return srcpath;
}
return ++p;
Expand Down

0 comments on commit 43a93a0

Please sign in to comment.