Qt: Fix paths getting truncated at first . (fixes #867)
Vicki Pfau vi@endrift.com
Thu, 07 Sep 2017 21:52:51 -0700
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
src/platform/qt/CoreManager.cpp
→
src/platform/qt/CoreManager.cpp
@@ -99,10 +99,10 @@ } else {
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);