all repos — mgba @ 9a9aba86e771785d71a96fc28b9d27f92cc6cc4b

mGBA Game Boy Advance Emulator

Qt: Fix loading games from archives (fixes #881)
Vicki Pfau vi@endrift.com
Thu, 21 Sep 2017 22:25:22 -0700
commit

9a9aba86e771785d71a96fc28b9d27f92cc6cc4b

parent

8a5183df0b927429ac42cc2a4a141c2f7d56202a

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/CoreManager.cppsrc/platform/qt/CoreManager.cpp

@@ -102,7 +102,10 @@

QByteArray bytes(path.toUtf8()); separatePath(bytes.constData(), nullptr, core->dirs.baseName, nullptr); - QFileInfo info(base + "/" + path); + QFileInfo info(base); + if (info.isDir()) { + info = QFileInfo(base + "/" + path); + } bytes = info.dir().canonicalPath().toUtf8(); mDirectorySetAttachBase(&core->dirs, VDirOpen(bytes.constData())); mCoreAutoloadSave(core);