mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-14 18:30:05 +00:00
Fix server crash if patch folder doesn't exist
This commit is contained in:
parent
0ccc66208d
commit
9fb41342b3
@ -1145,6 +1145,7 @@ void TableData::init() {
|
|||||||
fstream.close();
|
fstream.close();
|
||||||
|
|
||||||
// patching: loop through every directory within the patch directory, looking for a matching file
|
// patching: loop through every directory within the patch directory, looking for a matching file
|
||||||
|
if (!std::filesystem::exists(settings::PATCHDIR)) continue; // patch dir doesn't exist
|
||||||
json patch;
|
json patch;
|
||||||
for (const auto& patchModule : std::filesystem::directory_iterator(settings::PATCHDIR)) {
|
for (const auto& patchModule : std::filesystem::directory_iterator(settings::PATCHDIR)) {
|
||||||
// this is the theoretical path of a corresponding patch for this file
|
// this is the theoretical path of a corresponding patch for this file
|
||||||
|
Loading…
Reference in New Issue
Block a user