Fix dirmonitor sorting issues (#1599)

* Use `PATHSEP` in path-related functions

* Don't stop on digits when getting the common part in `system.path_compare`

* Avoid sorting multiple times in `dirwatch.get_directory_files`

This also fixes the timeout detection in `recurse_pred`.
This commit is contained in:
Guldoman authored and takase1121 committed 2023-11-30 09:20:34 +08:00
1 parent 6cd1f96234
commit 5c5c77219b
5 files changed
+37 -42

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ local tooltip_alpha_rate = 1
local function get_depth(filename)
local n = 1
for sep in filename:gmatch("[\\/]") do
for _ in filename:gmatch(PATHSEP) do
n = n + 1
end
return n