FIX: just load json profile

Change-Id: I15c54f67a7680e643b9d21a4facb9365ef08fe72
(cherry picked from commit e2f862b462445d0eeb69c99525a07db9d67d0a6f)
This commit is contained in:
zorro.zhang 2023-07-05 18:52:04 +08:00 committed by Lane.Wei
parent d08e5f6531
commit b7a11fb768
1 changed files with 5 additions and 2 deletions

View File

@ -1006,11 +1006,13 @@ int GuideFrame::LoadProfile()
} else {
//cout << "is a file" << endl;
//cout << iter->path().string() << endl;
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
strVendor = strVendor.AfterLast( '\\');
strVendor = strVendor.AfterLast('\/');
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
if (w2s(strVendor) == PresetBundle::BBL_BUNDLE)
if (w2s(strVendor) == PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json") == 0)
LoadProfileFamily(w2s(strVendor), iter->path().string());
}
}
@ -1027,8 +1029,9 @@ int GuideFrame::LoadProfile()
wxString strVendor = from_u8(iter->path().string()).BeforeLast('.');
strVendor = strVendor.AfterLast( '\\');
strVendor = strVendor.AfterLast('\/');
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
if (w2s(strVendor) != PresetBundle::BBL_BUNDLE)
if (w2s(strVendor) != PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json")==0)
LoadProfileFamily(w2s(strVendor), iter->path().string());
}
}