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);
|
||||
}
|
||||
|
||||
QFileInfo info(base + "/" + path);
|
||||
QByteArray bytes(info.baseName().toUtf8());
|
||||
strncpy(core->dirs.baseName, bytes.constData(), sizeof(core->dirs.baseName));
|
||||
QByteArray bytes(path.toUtf8());
|
||||
separatePath(bytes.constData(), nullptr, core->dirs.baseName, nullptr);
|
||||
|
||||
QFileInfo info(base + "/" + path);
|
||||
bytes = info.dir().canonicalPath().toUtf8();
|
||||
mDirectorySetAttachBase(&core->dirs, VDirOpen(bytes.constData()));
|
||||
mCoreAutoloadSave(core);
|
||||
|
|
Loading…
Reference in New Issue