mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Server pushing media at runtime (#9961)
This commit is contained in:
parent
982a030f33
commit
2424dfe007
16 changed files with 263 additions and 85 deletions
|
@ -691,6 +691,12 @@ std::string AbsolutePath(const std::string &path)
|
|||
const char *GetFilenameFromPath(const char *path)
|
||||
{
|
||||
const char *filename = strrchr(path, DIR_DELIM_CHAR);
|
||||
// Consistent with IsDirDelimiter this function handles '/' too
|
||||
if (DIR_DELIM_CHAR != '/') {
|
||||
const char *tmp = strrchr(path, '/');
|
||||
if (tmp && tmp > filename)
|
||||
filename = tmp;
|
||||
}
|
||||
return filename ? filename + 1 : path;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue