mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-03 14:26:15 +00:00
Potential default dir fix
This commit is contained in:
@@ -256,11 +256,10 @@ void SyncResources(SOCKET Sock){
|
||||
UpdateUl(false,std::to_string(Pos) + "/" + std::to_string(Amount) + ": " + a.substr(a.find_last_of('/')));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
try {
|
||||
if(!fs::exists(GetGamePath() + L"mods/multiplayer")){
|
||||
fs::create_directory(GetGamePath() + L"mods/multiplayer");
|
||||
if(!fs::exists(GetGamePath() + "mods/multiplayer")){
|
||||
fs::create_directory(GetGamePath() + "mods/multiplayer");
|
||||
}
|
||||
std::string P = "mods/multiplayer" + a.substr(a.find_last_of('/'));
|
||||
fs::copy_file(a, GetGamePath() + std::wstring(P.begin(),P.end()),
|
||||
fs::copy_file(a, GetGamePath() + "mods/multiplayer" + a.substr(a.find_last_of('/')),
|
||||
fs::copy_options::overwrite_existing);
|
||||
} catch (std::exception& e) {
|
||||
error("Failed copy to the mods folder! " + std::string(e.what()));
|
||||
@@ -298,10 +297,10 @@ void SyncResources(SOCKET Sock){
|
||||
|
||||
}while(fs::file_size(a) != std::stoull(*FS) && !Terminate);
|
||||
if(!Terminate){
|
||||
if(!fs::exists(GetGamePath() + L"mods/multiplayer")){
|
||||
fs::create_directory(GetGamePath() + L"mods/multiplayer");
|
||||
if(!fs::exists(GetGamePath() + "mods/multiplayer")){
|
||||
fs::create_directory(GetGamePath() + "mods/multiplayer");
|
||||
}
|
||||
fs::copy_file(a,GetGamePath() + L"mods/multiplayer" + std::wstring(FName.begin(),FName.end()), fs::copy_options::overwrite_existing);
|
||||
fs::copy_file(a,GetGamePath() + "mods/multiplayer" + FName, fs::copy_options::overwrite_existing);
|
||||
}
|
||||
WaitForConfirm();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user