aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/fs/unix.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua
index eb7d870b..3e05fbf3 100644
--- a/src/luarocks/fs/unix.lua
+++ b/src/luarocks/fs/unix.lua
@@ -220,8 +220,11 @@ function unix.is_dir(file)
220 return true 220 return true
221 end 221 end
222 if fd then 222 if fd then
223 local _, _, ecode = fd:read(1)
223 fd:close() 224 fd:close()
224 return true 225 if ecode == 21 then -- "Is a directory"
226 return true
227 end
225 end 228 end
226 return false 229 return false
227end 230end