diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-05-25 02:01:39 +0300 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-05-25 02:01:39 +0300 |
commit | f90dca1286106406ab355cafebe367e9756c3dbb (patch) | |
tree | 061cf84c66545f07f13ae6f39228a764925dec84 | |
parent | f465b932dc1c539f89bdf10f27d704383ea690d9 (diff) | |
download | luaotfload-f90dca1286106406ab355cafebe367e9756c3dbb.tar.gz |
Fix symlink detection
-rw-r--r-- | otfl-font-nms.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 5064e89..2461145 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -489,7 +489,13 @@ local function path_normalize(path) if os.type ~= "windows" and os.type ~= "msdos" then local dest = lfs.readlink(path) if dest then - path = file.join(file.dirname(path), dest) + if kpse.readable_file(dest) then + path = dest + elseif kpse.readable_file(file.join(file.dirname(path), dest)) then + path = file.join(file.dirname(path), dest) + else + -- broken symlink? + end end end path = file.collapse_path(path) |