Remove unnecessary assignment

This commit is contained in:
Michael Leuchtenburg 2023-06-25 11:13:01 -04:00
parent d87bb3e279
commit 99db3a82b2
1 changed files with 1 additions and 2 deletions

View File

@ -384,11 +384,10 @@ function utils.parse_dir(dir_path, callback)
local result = {} local result = {}
local dir = gio.File.new_for_path(dir_path) local dir = gio.File.new_for_path(dir_path)
parser(dir, result) parser(dir, result)
for i, entry in ipairs(result) do for _, entry in ipairs(result) do
local desktop_file = gio.File.new_for_path(entry.file) local desktop_file = gio.File.new_for_path(entry.file)
local relative_path = dir:get_relative_path(desktop_file) local relative_path = dir:get_relative_path(desktop_file)
entry.desktop_file_id = string.gsub(relative_path, "/", "-") entry.desktop_file_id = string.gsub(relative_path, "/", "-")
result[i] = entry
end end
callback(result) callback(result)
end end