aboutsummaryrefslogtreecommitdiff
path: root/src/lib/lua52/lobject.h
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2021-12-30 12:20:46 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2021-12-30 15:10:49 +0100
commitb7818469fe5159950153b477b8d2499aeff7cd5e (patch)
treeb30e907e97b25dbf4f1424a425a873a9a42c2455 /src/lib/lua52/lobject.h
parent80bee9514bab46a32d94eeeebf3303ab2d954b9f (diff)
downloadlite-xl-fix-inotify-problem.tar.gz
lite-xl-fix-inotify-problem.zip
Always watch/unwatch subdirectories on all systemsfix-inotify-problem
Simplifies and uniformize the logic on the Lua side for the setting of directories' watches. Now we always use the methods: systems.watch_dir_add / rm on all the project's directories at any depth when we are not in files limit mode. In files limited mode the functions systems.watch_dir_add/rm are called only on the expanded folders. The shown_subdir table is also updated only in files limited mode. On the C side, using the dmon library, we remove the recursive argument from the system.watch_dir and we always call it recursively except on Linux. At the same time the functions: systems.watch_dir_add / rm are provided but as dummy functions that does nothing except on Linux where they work as before to add / remove sub-directories in the inotify watch. In this was on the Lua side we always act we if the watches needed to be set for each sub-directory explicitly, independently of the system. The important improvement introduced is that we always avoid calling dmon_watch recursively on Linux. This latter thing is problematic with inotify and is therefore avoided on Linux. On the other side we simplifies the logic on the Lua side and remove conditions based on the OS used.
Diffstat (limited to 'src/lib/lua52/lobject.h')
0 files changed, 0 insertions, 0 deletions