Skip to content

Commit ae99f3b

Browse files
committed
fix(fs): samefile fallback and early path checks for dir
1 parent cce1654 commit ae99f3b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/mods/fs.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ function M.samefile(path_a, path_b)
255255
return nil, errmsg, errcode
256256
end
257257

258+
if a.ino == 0 or b.ino == 0 then
259+
return path.normcase(path.abspath(path_a)) == path.normcase(path.abspath(path_b))
260+
end
261+
258262
return a.dev == b.dev and a.ino == b.ino
259263
end
260264

0 commit comments

Comments
 (0)