mirror of
https://github.com/libretro/libretro-common.git
synced 2024-05-11 09:05:27 -04:00
Resync
This commit is contained in:
parent
e950b63b69
commit
0df91cc414
|
@ -347,21 +347,20 @@ size_t fill_pathname(char *out_path, const char *in_path,
|
|||
* @size : size of path
|
||||
*
|
||||
* Find last slash in path. Tries to find
|
||||
* a backslash on Windows too which takes precedence
|
||||
* over regular slash.
|
||||
* a backslash as used for Windows paths,
|
||||
* otherwise checks for a regular slash.
|
||||
|
||||
* @return pointer to last slash/backslash found in @str.
|
||||
**/
|
||||
char *find_last_slash(const char *str)
|
||||
{
|
||||
const char *slash = strrchr(str, '/');
|
||||
#ifdef _WIN32
|
||||
const char *backslash = strrchr(str, '\\');
|
||||
|
||||
if (!slash || (backslash > slash))
|
||||
return (char*)backslash;
|
||||
#endif
|
||||
return (char*)slash;
|
||||
else
|
||||
return (char*)slash;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue