Skip to content

Commit

Permalink
Enable realpath handling on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zauguin committed Feb 5, 2024
1 parent fbf1d69 commit bca33b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/luaotfload-database.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@ local function process_dir_tree (acc, dirs, done)
logreport ("both", 1, "db", "Skipping font directory: %s", mode_or_err)
return process_dir_tree (acc, dirs, done)
elseif mode_or_err ~= 'directory' then
logreport ("both", 1, "db", "Skipping non-directory wile searching fonts: %q (%s)", dir, mode_or_err)
logreport ("both", 1, "db", "Skipping non-directory while searching fonts: %q (%s)", dir, mode_or_err)
return process_dir_tree (acc, dirs, done)
end

Expand Down
17 changes: 4 additions & 13 deletions src/luaotfload-realpath.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,10 @@ local function resolve_path_to_tree(path)
end
end

local resolve_path = ({
unix = function(path)
local tree, err = resolve_path_to_tree(path)
if not tree then return tree, err end
return recombine_path(tree[path_components]), tree[file_mode]
end,
})[os.type] or function(path)
local mode, err = attributes(path)
if mode then
return path, mode
else
return mode, err
end
local function resolve_path(path)
local tree, err = resolve_path_to_tree(path)
if not tree then return tree, err end
return recombine_path(tree[path_components]), tree[file_mode]
end

return {
Expand Down

0 comments on commit bca33b5

Please sign in to comment.