fix: error in matching pattern caused some files to be recognized as magnet links

closes #605
This commit is contained in:
tomasklaen
2023-08-16 10:07:36 +02:00
parent bc7b1a12bc
commit f857d468e1

View File

@@ -319,7 +319,7 @@ end
-- Check if path is a protocol, such as `http://...`.
---@param path string
function is_protocol(path)
return type(path) == 'string' and (path:find('^%a[%a%d-_]+://') ~= nil or path:find('^%a[%a%d-_]+:\\?') ~= nil)
return type(path) == 'string' and (path:find('^%a[%a%d-_]+://') ~= nil or path:find('^%a[%a%d-_]+:%?') ~= nil)
end
---@param path string