mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 16:25:35 +00:00
check if Resources/Server directory exists, and only create it if it doesnt
While this doesn't make a difference with usual setups, it does if the server path exists but is a symlink. In that case, the create_directories call fails, and the server aborts. this fixes that. :^)
This commit is contained in:
parent
6e46d5aca9
commit
dfa90da8af
@ -274,7 +274,9 @@ std::shared_ptr<TLuaResult> TLuaEngine::EnqueueFunctionCall(TLuaStateId StateID,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TLuaEngine::CollectAndInitPlugins() {
|
void TLuaEngine::CollectAndInitPlugins() {
|
||||||
fs::create_directories(mResourceServerPath);
|
if (!fs::exists(mResourceServerPath)) {
|
||||||
|
fs::create_directories(mResourceServerPath);
|
||||||
|
}
|
||||||
for (const auto& Dir : fs::directory_iterator(mResourceServerPath)) {
|
for (const auto& Dir : fs::directory_iterator(mResourceServerPath)) {
|
||||||
auto Path = Dir.path();
|
auto Path = Dir.path();
|
||||||
Path = fs::relative(Path);
|
Path = fs::relative(Path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user