diff options
author | 2013-01-05 15:28:38 -0500 | |
---|---|---|
committer | 2013-01-05 15:28:38 -0500 | |
commit | cb3d88710c8b07f48d95b908fd8ef1913ac8e517 (patch) | |
tree | 4c00ef9432a9228f4dd98ddeb10e1e055e0c50ab | |
parent | 42577760a8d333f60fd5366aad05b62cff3fb939 (diff) |
Do not error on non-existant dropped URIs; core/gui.lua
-rw-r--r-- | core/gui.lua | 4 |
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) |