Don't crash if you get one of these "{}" entries that 1Password makes.
It looks like some version of 1Password has obsolete entries that still have
JSON files listed, but the entirety of the JSON is "{}" ... we now check if we
got an empty table back from the Lua JSON parser and treat it as a dead entry.
--- a/1pass.lua Tue Jul 08 23:47:17 2014 -0400
+++ b/1pass.lua Tue Jul 08 23:49:15 2014 -0400
@@ -246,7 +246,7 @@
local function build_secret_menuitems(info, menu)
local metadata = load_json(basedir .. "/" .. info.uuid .. ".1password")
- if metadata == nil then
+ if (metadata == nil) or (next(metadata) == nil) then -- the "next" trick tests if table is empty.
return
end