Qt: Fix loading games from archives (fixes #881)

This commit is contained in:
Vicki Pfau 2017-09-21 22:25:22 -07:00
parent 8a5183df0b
commit 9a9aba86e7
1 changed files with 4 additions and 1 deletions

View File

@ -102,7 +102,10 @@ CoreController* CoreManager::loadGame(VFile* vf, const QString& path, const QStr
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);