Merge pull request #1536 from jmccrohan/naughty_icon_urldecode
naughty: urldecode icon URI file
This commit is contained in:
commit
77c92d0d63
|
@ -626,6 +626,8 @@ function naughty.notify(args)
|
||||||
-- Is this really an URI instead of a path?
|
-- Is this really an URI instead of a path?
|
||||||
if type(icon) == "string" and string.sub(icon, 1, 7) == "file://" then
|
if type(icon) == "string" and string.sub(icon, 1, 7) == "file://" then
|
||||||
icon = string.sub(icon, 8)
|
icon = string.sub(icon, 8)
|
||||||
|
-- urldecode URI path
|
||||||
|
icon = string.gsub(icon, "%%(%x%x)", function(x) return string.char(tonumber(x, 16)) end )
|
||||||
end
|
end
|
||||||
-- try to guess icon if the provided one is non-existent/readable
|
-- try to guess icon if the provided one is non-existent/readable
|
||||||
if type(icon) == "string" and not util.file_readable(icon) then
|
if type(icon) == "string" and not util.file_readable(icon) then
|
||||||
|
|
Loading…
Reference in New Issue