fix GetShortFilename function (#5728)
when blender export fbx then embedded texture path have slash and back slash. so GetShortFilename have to check both types of slashes Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>pull/5732/head
parent
12ed0286e4
commit
d32370ff12
|
@ -401,8 +401,9 @@ struct ASSIMP_API aiScene {
|
|||
//! Returns a short filename from a full path
|
||||
static const char* GetShortFilename(const char* filename) {
|
||||
const char* lastSlash = strrchr(filename, '/');
|
||||
if (lastSlash == nullptr) {
|
||||
lastSlash = strrchr(filename, '\\');
|
||||
const char* lastBackSlash = strrchr(filename, '\\');
|
||||
if (lastSlash < lastBackSlash) {
|
||||
lastSlash = lastBackSlash;
|
||||
}
|
||||
const char* shortFilename = lastSlash != nullptr ? lastSlash + 1 : filename;
|
||||
return shortFilename;
|
||||
|
|
Loading…
Reference in New Issue