mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-06-18 19:40:54 +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:
+3
-1
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user