From 765a5f57906ffe1941369147d4b4b072ae164949 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 11 Oct 2015 12:35:14 +0200 Subject: [PATCH] menubar.icon_theme: use GLib.build_filenamev to join paths This eliminates double slashes from the resulting paths. `GLib.get_system_data_dirs` might return paths with and without trailing slashes. --- lib/menubar/icon_theme.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/menubar/icon_theme.lua b/lib/menubar/icon_theme.lua index e8847182a..18e7f38c0 100644 --- a/lib/menubar/icon_theme.lua +++ b/lib/menubar/icon_theme.lua @@ -51,18 +51,18 @@ end local get_pragmatic_base_directories = function() local dirs = {} - local dir = GLib.get_home_dir() .. "/.icons" + local dir = GLib.build_filenamev({GLib.get_home_dir(), ".icons"}) if is_readable_directory(dir) then table.insert(dirs, dir) end - dir = GLib.get_user_data_dir() .. "/icons" + dir = GLib.build_filenamev({GLib.get_user_data_dir(), "icons"}) if is_readable_directory(dir) then table.insert(dirs, dir) end for _, v in ipairs(GLib.get_system_data_dirs()) do - dir = v .. "/icons" + dir = GLib.build_filenamev({v, "icons"}) if is_readable_directory(dir) then table.insert(dirs, dir) end @@ -70,7 +70,7 @@ local get_pragmatic_base_directories = function() local need_usr_share_pixmaps = true for _, v in ipairs(GLib.get_system_data_dirs()) do - dir = v .. "/pixmaps" + dir = GLib.build_filenamev({v, "pixmaps"}) if is_readable_directory(dir) then table.insert(dirs, dir) end