diff options
author | 2010-07-21 18:42:23 -0400 | |
---|---|---|
committer | 2010-07-21 18:42:23 -0400 | |
commit | 2b25b225310bef5095ed356b1d2d6a3b331925cb (patch) | |
tree | 91b01268fd66797987ce1f7ffd7a9e7f1f763005 /core/events.lua | |
parent | 1c406403ba2bd7cdfe800075bf117b51d9e0cbcd (diff) | |
download | textadept-2b25b225310bef5095ed356b1d2d6a3b331925cb.tar.gz textadept-2b25b225310bef5095ed356b1d2d6a3b331925cb.zip |
Use forward slashes in uri_dropped event for Win32; core/events.lua
Diffstat (limited to 'core/events.lua')
-rw-r--r-- | core/events.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/events.lua b/core/events.lua index a646ba07..97459c28 100644 --- a/core/events.lua +++ b/core/events.lua @@ -317,7 +317,10 @@ connect('uri_dropped', utf8_uri = utf8_uri:match('^file://([^\r\n\f]+)') utf8_uri = utf8_uri:gsub('%%(%x%x)', function(hex) return string.char(tonumber(hex, 16)) end) - if WIN32 then utf8_uri = utf8_uri:sub(2, -1) end -- ignore leading '/' + if WIN32 then + utf8_uri = utf8_uri:sub(2, -1) -- ignore leading '/' + utf8_uri = utf8_uri:gsub('/', '\\') + end local uri = utf8_uri:iconv(_CHARSET, 'UTF-8') if lfs.attributes(uri).mode ~= 'directory' then io.open_file(utf8_uri) |