aboutsummaryrefslogtreecommitdiff
path: root/core/gui.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/gui.lua')
-rw-r--r--core/gui.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/gui.lua b/core/gui.lua
index 6f4b27a8..4492fc79 100644
--- a/core/gui.lua
+++ b/core/gui.lua
@@ -331,8 +331,8 @@ events_connect(events.URI_DROPPED, function(utf8_uris)
return string.char(tonumber(hex, 16))
end)
if WIN32 then utf8_uri = utf8_uri:sub(2, -1) end -- ignore leading '/'
- local uri = utf8_uri:iconv(_CHARSET, 'UTF-8')
- if lfs.attributes(uri).mode ~= 'directory' then io.open_file(utf8_uri) end
+ local mode = lfs.attributes(utf8_uri:iconv(_CHARSET, 'UTF-8'), 'mode')
+ if mode and mode ~= 'directory' then io.open_file(utf8_uri) end
end
end
end)