commit 3d855a9ef0798545e10072f05d142c2a88e81bfd Author: Vincent Untz <vuntz@gnome.org> Date: Thu Sep 9 10:14:33 2010 +0200 Fix issues reading environment .variables files We can't guarantee there's a trailing slash in directories from XDG_DATA_DIRS. diff --git a/common/gksu-environment.vala b/common/gksu-environment.vala index 362ff4a..3438844 100644 --- a/common/gksu-environment.vala +++ b/common/gksu-environment.vala @@ -34,7 +34,7 @@ namespace Gksu { variables = new HashMap<string,Variable>(GLib.str_hash, GLib.str_equal); foreach(string path in search_path) { - string full_path = path.concat("gksu-polkit-1/environment/"); + string full_path = Path.build_filename (path, "gksu-polkit-1", "environment"); read_variables_from_path(full_path); } } @@ -99,7 +99,7 @@ namespace Gksu { weak string entry; while((entry = directory.read_name()) != null) { if(entry.has_suffix(".variables")) { - string full_path = path.concat(entry); + string full_path = Path.build_filename (path, entry); read_variables_from_file(full_path); } }