server: fix filesystem dependency in security logging
Replace std::filesystem::create_directories with fs_create_directory_with_parents to avoid compilation issues on systems without <filesystem> header.
This commit is contained in:
parent
0306a58fce
commit
92d5771e4c
|
|
@ -10,7 +10,6 @@
|
|||
#include "server-common.h"
|
||||
|
||||
#include <ctime>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <mutex>
|
||||
#include <random>
|
||||
|
|
@ -2084,7 +2083,9 @@ static void rotate_security_log_if_needed() {
|
|||
}
|
||||
|
||||
// Create directory if it doesn't exist
|
||||
std::filesystem::create_directories(g_security_log_folder);
|
||||
if (!fs_create_directory_with_parents(g_security_log_folder)) {
|
||||
LOG_WRN("Failed to create security log directory: %s\n", g_security_log_folder.c_str());
|
||||
}
|
||||
|
||||
// Set new log file
|
||||
common_log_set_file(g_security_log, new_log_file.c_str());
|
||||
|
|
|
|||
Loading…
Reference in New Issue