diff options
-rw-r--r-- | src/base_media_func.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base_media_func.h b/src/base_media_func.h index 42d5cad2f..98f855217 100644 --- a/src/base_media_func.h +++ b/src/base_media_func.h @@ -159,9 +159,9 @@ bool BaseMedia<Tbase_set>::AddFile(const char *filename, size_t basepath_length, Tbase_set *set = new Tbase_set(); IniFile *ini = new IniFile(); - ini->LoadFromDisk(filename, BASESET_DIR); - char *path = stredup(filename + basepath_length); + ini->LoadFromDisk(path, BASESET_DIR); + char *psep = strrchr(path, PATHSEPCHAR); if (psep != nullptr) { psep[1] = '\0'; |