mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix paths getting truncated at first . (fixes #867)
This commit is contained in:
parent
10a5432df7
commit
13d3e1dfec
|
@ -99,10 +99,10 @@ CoreController* CoreManager::loadGame(VFile* vf, const QString& path, const QStr
|
||||||
core->loadROM(core, vf);
|
core->loadROM(core, vf);
|
||||||
}
|
}
|
||||||
|
|
||||||
QFileInfo info(base + "/" + path);
|
QByteArray bytes(path.toUtf8());
|
||||||
QByteArray bytes(info.baseName().toUtf8());
|
separatePath(bytes.constData(), nullptr, core->dirs.baseName, nullptr);
|
||||||
strncpy(core->dirs.baseName, bytes.constData(), sizeof(core->dirs.baseName));
|
|
||||||
|
|
||||||
|
QFileInfo info(base + "/" + path);
|
||||||
bytes = info.dir().canonicalPath().toUtf8();
|
bytes = info.dir().canonicalPath().toUtf8();
|
||||||
mDirectorySetAttachBase(&core->dirs, VDirOpen(bytes.constData()));
|
mDirectorySetAttachBase(&core->dirs, VDirOpen(bytes.constData()));
|
||||||
mCoreAutoloadSave(core);
|
mCoreAutoloadSave(core);
|
||||||
|
|
Loading…
Reference in New Issue