From 5ba33f846129f3e6c0505b19f94634b24505e828 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 26 Apr 2026 15:16:36 +0100 Subject: config/lua: init lua config manager, use lua if available (#13817) Adds a new lua config manager, which will automatically be used if there is a lua config present. --- src/config/shared/inotify/ConfigWatcher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/config/shared/inotify/ConfigWatcher.cpp') diff --git a/src/config/shared/inotify/ConfigWatcher.cpp b/src/config/shared/inotify/ConfigWatcher.cpp index 02cedbd6..c10039e4 100644 --- a/src/config/shared/inotify/ConfigWatcher.cpp +++ b/src/config/shared/inotify/ConfigWatcher.cpp @@ -39,7 +39,7 @@ CFileDescriptor& CConfigWatcher::getInotifyFD() { } void CConfigWatcher::update() { - static const auto PDISABLEAUTORELOAD = CConfigValue("misc:disable_autoreload"); + static const auto PDISABLEAUTORELOAD = CConfigValue("misc:disable_autoreload"); setWatchList(*PDISABLEAUTORELOAD ? std::vector{} : Config::mgr()->getConfigPaths()); } @@ -60,7 +60,7 @@ void CConfigWatcher::setWatchList(const std::vector& paths) { // add new paths for (const auto& path : paths) { m_watches.emplace_back(SInotifyWatch{ - .wd = inotify_add_watch(m_inotifyFd.get(), path.c_str(), IN_MODIFY | IN_DONT_FOLLOW), + .wd = inotify_add_watch(m_inotifyFd.get(), path.c_str(), IN_CLOSE_WRITE | IN_DONT_FOLLOW), .file = path, }); @@ -69,7 +69,7 @@ void CConfigWatcher::setWatchList(const std::vector& paths) { const auto IS_SYMLINK = std::filesystem::is_symlink(path, ec2); if (!ec && !ec2 && IS_SYMLINK) { m_watches.emplace_back(SInotifyWatch{ - .wd = inotify_add_watch(m_inotifyFd.get(), CANONICAL.c_str(), IN_MODIFY), + .wd = inotify_add_watch(m_inotifyFd.get(), CANONICAL.c_str(), IN_CLOSE_WRITE), .file = path, }); } -- cgit v1.2.3