Skip to content

Commit

Permalink
Fixed maps with new line in the name
Browse files Browse the repository at this point in the history
  • Loading branch information
NSGolova committed Jan 17, 2024
1 parent a909ab9 commit cf72fe1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
34 changes: 19 additions & 15 deletions mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,45 @@
"_QPVersion": "0.1.1",
"name": "BeatLeader",
"id": "BeatLeader",
"description": "Open source custom maps leaderboard",
"author": "NSGolova",
"version": "0.6.1",
"packageId": "com.beatgames.beatsaber",
"packageVersion": "1.28.0_4124311467",
"coverImage": "cover.png",
"dependencies": [
{
"version": "^0.33.0",
"id": "codegen",
"downloadIfMissing": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.33.0/Codegen.qmod"
"version": "^0.7.0",
"id": "bs-utils",
"downloadIfMissing": "https://github.com/sc2ad/QuestBS-Utils/releases/download/v0.7.2/BS-Utils.qmod"
},
{
"version": "^0.17.11",
"id": "questui",
"downloadIfMissing": "https://github.com/darknight1050/QuestUI/releases/download/v0.17.12/QuestUI.qmod"
},
{
"version": "^0.15.23",
"id": "custom-types",
"downloadIfMissing": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.24/CustomTypes.qmod"
},
{
"version": "^0.10.15",
"id": "songloader",
"downloadIfMissing": "https://github.com/darknight1050/SongLoader/releases/download/v0.10.17/SongLoader.qmod"
},
{
"version": "^0.7.0",
"id": "bs-utils",
"downloadIfMissing": "https://github.com/sc2ad/QuestBS-Utils/releases/download/v0.7.2/BS-Utils.qmod"
"version": "^0.15.23",
"id": "custom-types",
"downloadIfMissing": "https://github.com/sc2ad/Il2CppQuestTypePatching/releases/download/v0.15.24/CustomTypes.qmod"
},
{
"version": "^0.33.0",
"id": "codegen",
"downloadIfMissing": "https://github.com/sc2ad/BeatSaber-Quest-Codegen/releases/download/v0.33.0/Codegen.qmod"
}
],
"modFiles": [],
"lateModFiles": ["libbl.so"],
"libraryFiles": ["libbeatsaber-hook_3_14_0.so"],
"modFiles": [
"libbl.so"
],
"libraryFiles": [
"libbeatsaber-hook_3_14_0.so"
],
"fileCopies": [],
"copyExtensions": []
}
}
2 changes: 1 addition & 1 deletion src/Utils/FileManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ string FileManager::ToFilePath(Replay const &replay) {
// TODO: Use fmt
string filename = replay.info.playerID + std::string(practice + fail) + "-" + replay.info.songName + "-" + replay.info.difficulty + "-" + replay.info.mode + "-" + replay.info.hash + ".bsor";

string illegalChars = "\\/:?*\"<>|";
string illegalChars = "\\/:?*\"<>()|\r\n";
for (auto it = filename.begin(); it < filename.end(); ++it){
bool found = illegalChars.find(*it) != string::npos;
if(found){
Expand Down

0 comments on commit cf72fe1

Please sign in to comment.