From 6ec9977851174de72e4e89c19ba6b6319a4db424 Mon Sep 17 00:00:00 2001 From: starenka Date: Wed, 15 Feb 2017 16:35:18 +0100 Subject: [PATCH 1/2] fixing `nil` sent to curl --- widgets/gmail_all.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/gmail_all.lua b/widgets/gmail_all.lua index 4c1a0c2..be41894 100644 --- a/widgets/gmail_all.lua +++ b/widgets/gmail_all.lua @@ -39,7 +39,7 @@ local mail = { -- {{{ Gmail widget type local function worker(format, warg) -- Get info from the Gmail atom feed - local f = io.popen("curl --connect-timeout 1 -m 3 -fsn " .. helpers.shellquote(feed[1])) + local f = io.popen("curl --connect-timeout 1 -m 3 -fsn " .. helpers.shellquote(feed)) -- Could be huge don't read it all at once, info we are after is at the top local xml = f:read(2000) From e8bf98eb7fb4a7a7dcd15db988dc6adff64a3b08 Mon Sep 17 00:00:00 2001 From: starenka Date: Fri, 17 Feb 2017 00:21:56 +0100 Subject: [PATCH 2/2] Fix for not working gmail widget --- widgets/gmail_all.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/gmail_all.lua b/widgets/gmail_all.lua index be41894..95d8bc8 100644 --- a/widgets/gmail_all.lua +++ b/widgets/gmail_all.lua @@ -44,7 +44,7 @@ local function worker(format, warg) -- Could be huge don't read it all at once, info we are after is at the top local xml = f:read(2000) - if xml ~= nil then + if xml == nil then return mail end