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
2023-11-30 09:20:34 +08:00
committed by takase1121
parent 6cd1f96234
commit 5c5c77219b
5 changed files with 37 additions and 42 deletions
+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