]> gitweb.fluxo.info Git - awesompd.git/commitdiff
Change double quote wrapping of filenames to single quote
authorAlexander Yakushev <yakushev.alex@gmail.com>
Sat, 15 Oct 2011 12:40:15 +0000 (15:40 +0300)
committerAlexander Yakushev <yakushev.alex@gmail.com>
Sat, 15 Oct 2011 12:40:15 +0000 (15:40 +0300)
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.

awesompd.lua

index 68f04b90a11c4740eea7b459c4480f4c12758b27..2887bffd73180e40d68955694afbd11e3fcaafb6 100644 (file)
@@ -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