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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user