From: Alexander Yakushev Date: Sat, 15 Oct 2011 12:40:15 +0000 (+0300) Subject: Change double quote wrapping of filenames to single quote X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=d7687d3d406088dcbfee97ed8c4ee18fc2945f5c;p=awesompd.git Change double quote wrapping of filenames to single quote This is used in try_get_cover function that searches for album arts for local songs. Double quote wrapping failed on folders with special characters like ! or ? in their names. --- diff --git a/awesompd.lua b/awesompd.lua index 68f04b9..2887bff 100644 --- a/awesompd.lua +++ b/awesompd.lua @@ -981,7 +981,7 @@ function awesompd:try_get_local_cover() local folder = music_folder .. current_file_folder -- Get all images in the folder - local covers = self.pread('ls "' .. folder .. '" | grep -P "\.jpg\|\.png\|\.gif|\.jpeg"', "*all") + local covers = self.pread("ls '" .. folder .. "' | grep -P '\.jpg\|\.png\|\.gif|\.jpeg'", "*all") local covers_table = self.split(covers) if covers_table.n > 0 then