Fix: IniLoadFile::LoadFromDisk expects filename but BaseMedia::AddFile provided full path (#7348)

This commit is contained in:
Berbe 2019-05-01 19:57:23 +02:00 committed by PeterN
parent 76788a1eb3
commit 04c74355ba

View File

@ -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';