Make the list effective in real time
This commit is contained in:
parent
2c90990625
commit
2428fd2ffc
|
|
@ -249,11 +249,16 @@ namespace edxp {
|
||||||
return app_modules_list;
|
return app_modules_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::filesystem::file_time_type ConfigManager::GetLastWriteTime() const {
|
fs::file_time_type ConfigManager::GetLastWriteTime() const {
|
||||||
auto modules_list = GetConfigPath("modules.list");
|
auto config_path = GetConfigPath();
|
||||||
if (!path_exists<true>(modules_list))
|
auto blacklist_path = GetConfigPath("blacklist");
|
||||||
return {};
|
auto whitelist_path = GetConfigPath("whitelist");
|
||||||
return fs::last_write_time(modules_list);
|
return std::max({path_exists<true>(config_path) ? fs::last_write_time(config_path)
|
||||||
|
: fs::file_time_type{},
|
||||||
|
path_exists<true>(blacklist_path) ? fs::last_write_time(blacklist_path)
|
||||||
|
: fs::file_time_type{},
|
||||||
|
path_exists<true>(whitelist_path) ? fs::last_write_time(whitelist_path)
|
||||||
|
: fs::file_time_type{}});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigManager::InitConfigPath() const {
|
bool ConfigManager::InitConfigPath() const {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue