[latex3-commits] [latex3/luaotfload] dev: Enable realpath handling on Windows (bca33b5a)

github at latex-project.org github at latex-project.org
Mon Feb 5 20:21:51 CET 2024


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/bca33b5aedd6dd99ba4f8edd8da5fc8899394c41

>---------------------------------------------------------------

commit bca33b5aedd6dd99ba4f8edd8da5fc8899394c41
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Mon Feb 5 20:21:51 2024 +0100

    Enable realpath handling on Windows


>---------------------------------------------------------------

bca33b5aedd6dd99ba4f8edd8da5fc8899394c41
 src/luaotfload-database.lua |  2 +-
 src/luaotfload-realpath.lua | 17 ++++-------------
 2 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index 39efc1e5..a569f9dd 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -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
 
diff --git a/src/luaotfload-realpath.lua b/src/luaotfload-realpath.lua
index 1ecf1f55..2738da8a 100644
--- a/src/luaotfload-realpath.lua
+++ b/src/luaotfload-realpath.lua
@@ -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 {





More information about the latex3-commits mailing list.