Merge pull request #864 from psychon/menubar-query-file-type

menubar.utils.parse_dir: Ask Gio for file type
This commit is contained in:
Daniel Hahler 2016-05-01 16:56:07 +02:00
commit e4623d0e20
1 changed files with 2 additions and 1 deletions

View File

@ -254,7 +254,8 @@ function utils.parse_dir(dir_path, callback)
local function parser(dir, programs)
local f = gio.File.new_for_path(dir)
-- Except for "NONE" there is also NOFOLLOW_SYMLINKS
local enum, err = f:async_enumerate_children("standard::name", gio.FileQueryInfoFlags.NONE)
local query = gio.FILE_ATTRIBUTE_STANDARD_NAME .. "," .. gio.FILE_ATTRIBUTE_STANDARD_TYPE
local enum, err = f:async_enumerate_children(query, gio.FileQueryInfoFlags.NONE)
if not enum then
debug.print_error(err)
return