Skip over XDG directories that cannot be found.

This fixes loading the places menu gnome-shell extension when the XDG
directories have not been configured.

https://bugzilla.gnome.org/show_bug.cgi?id=741033
This commit is contained in:
Maxime Henrion
2014-12-02 18:51:59 +01:00
committed by Florian Müllner
parent 2f49d77931
commit 3771d49149
+1 -1
View File
@@ -202,7 +202,7 @@ const PlacesManager = new Lang.Class({
let specials = [];
for (let i = 0; i < DEFAULT_DIRECTORIES.length; i++) {
let specialPath = GLib.get_user_special_dir(DEFAULT_DIRECTORIES[i]);
if (specialPath == homePath)
if (specialPath == null || specialPath == homePath)
continue;
let file = Gio.File.new_for_path(specialPath), info;