mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Properly add slash check and fix JPN Lang selection.
This commit is contained in:
@@ -110,7 +110,7 @@ std::vector<std::string> getContents(const std::string &name, const std::vector<
|
||||
const std::string &fieName: Const Reference to the filename, without path.
|
||||
*/
|
||||
UniStoreInfo GetInfo(const std::string &file, const std::string &fileName) {
|
||||
UniStoreInfo Temp = { "", "", "", fileName, "", -1, -1, -1 }; // Title, Author, URL, FileName, Desc, Version, Revision, Entries.
|
||||
UniStoreInfo Temp = { "", "", "", "", fileName, "", -1, -1, -1 }; // Title, Author, URL, File (to check if no slash exist), FileName, Desc, Version, Revision, Entries.
|
||||
nlohmann::json JSON = nullptr;
|
||||
|
||||
FILE *temp = fopen(file.c_str(), "r");
|
||||
@@ -123,6 +123,10 @@ UniStoreInfo GetInfo(const std::string &file, const std::string &fileName) {
|
||||
Temp.Title = JSON["storeInfo"]["title"];
|
||||
}
|
||||
|
||||
if (JSON["storeInfo"].contains("file") && JSON["storeInfo"]["file"].is_string()) {
|
||||
Temp.File = JSON["storeInfo"]["file"];
|
||||
}
|
||||
|
||||
if (JSON["storeInfo"].contains("author") && JSON["storeInfo"]["author"].is_string()) {
|
||||
Temp.Author = JSON["storeInfo"]["author"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user