From 133fe63b85978ac1f21658c5decd66e269261e60 Mon Sep 17 00:00:00 2001 From: copycat-killer Date: Sat, 4 Feb 2017 14:40:21 +0100 Subject: [PATCH] #308 fix --- widgets/mpd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/mpd.lua b/widgets/mpd.lua index 58e8303..ddedf24 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -112,7 +112,7 @@ local function worker(args) if not string.match(mpd_now.file, "http.*://") then -- local file instead of http stream local path = string.format("%s/%s", music_dir, string.match(mpd_now.file, ".*/")) - local cover = string.format("find '%s' -maxdepth 1 -type f | egrep -i -m1 '%s'", path:gsub("'", "\'"):gsub('"', '\"'), cover_pattern) + local cover = string.format("find '%s' -maxdepth 1 -type f | egrep -i -m1 '%s'", path:gsub("'", "'\\''"), cover_pattern) helpers.async({ shell, "-c", cover }, function(current_icon) common.icon = current_icon:gsub("\n", "") if #common.icon == 0 then common.icon = nil end -- 2.39.5