mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-03 00:16:50 +00:00
catch errors when the custom caching directory is not accessible
🧯
This commit is contained in:
parent
1362471657
commit
19d1245379
@ -37,7 +37,13 @@ namespace fs = std::filesystem;
|
|||||||
|
|
||||||
void CheckForDir() {
|
void CheckForDir() {
|
||||||
if (!fs::exists(CachingDirectory)) {
|
if (!fs::exists(CachingDirectory)) {
|
||||||
fs::create_directory(CachingDirectory);
|
try {
|
||||||
|
fs::create_directories(CachingDirectory);
|
||||||
|
} catch (const std::exception& e) {
|
||||||
|
error(std::string("Failed to create caching directory: ") + e.what() + ". This is a fatal error. Please make sure to configure a directory which you have permission to create, read and write from/to.");
|
||||||
|
std::this_thread::sleep_for(std::chrono::seconds(3));
|
||||||
|
std::exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void WaitForConfirm() {
|
void WaitForConfirm() {
|
||||||
|
@ -81,10 +81,10 @@ std::string GetEN() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string GetVer() {
|
std::string GetVer() {
|
||||||
return "2.0";
|
return "2.1";
|
||||||
}
|
}
|
||||||
std::string GetPatch() {
|
std::string GetPatch() {
|
||||||
return ".99";
|
return ".0";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetEP(char* P) {
|
std::string GetEP(char* P) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user