From 2b25b225310bef5095ed356b1d2d6a3b331925cb Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 21 Jul 2010 18:42:23 -0400 Subject: Use forward slashes in uri_dropped event for Win32; core/events.lua --- core/events.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core') 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) -- cgit v1.2.3