mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-04 00:47:23 +00:00
1.80.92, fixed some startup crashes
This commit is contained in:
parent
c77f8742b4
commit
8e55edaa29
@ -131,11 +131,24 @@ std::string QueryKey(HKEY hKey,int ID){
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
|
bool NameValid(const std::string& N){
|
||||||
|
if(N == "config" || N == "librarycache"){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(N.find_first_not_of("0123456789") == std::string::npos){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
void FileList(std::vector<std::string>&a,const std::string& Path){
|
void FileList(std::vector<std::string>&a,const std::string& Path){
|
||||||
for (const auto &entry : fs::directory_iterator(Path)) {
|
for (const auto &entry : fs::directory_iterator(Path)) {
|
||||||
|
const auto& DPath = entry.path();
|
||||||
if (!entry.is_directory()) {
|
if (!entry.is_directory()) {
|
||||||
a.emplace_back(entry.path().u8string());
|
a.emplace_back(DPath.u8string());
|
||||||
}else FileList(a,entry.path().u8string());
|
}else if(NameValid(DPath.filename().u8string())){
|
||||||
|
FileList(a, DPath.u8string());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool Find(const std::string& FName,const std::string& Path){
|
bool Find(const std::string& FName,const std::string& Path){
|
||||||
|
@ -27,7 +27,7 @@ std::string GetVer(){
|
|||||||
return "1.80";
|
return "1.80";
|
||||||
}
|
}
|
||||||
std::string GetPatch(){
|
std::string GetPatch(){
|
||||||
return ".91";
|
return ".92";
|
||||||
}
|
}
|
||||||
void ReLaunch(int argc,char*args[]){
|
void ReLaunch(int argc,char*args[]){
|
||||||
std::string Arg;
|
std::string Arg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user