PlacesMenu: don't fail for GIO errors getting the file name
Different GIO backends can fail in different ways trying to query file infos. If that's the case, fail back to safe get_basename() instead of crashing.
This commit is contained in:
@@ -75,7 +75,7 @@ const PlaceInfo = new Lang.Class({
|
||||
try {
|
||||
let info = this.file.query_info('standard::display-name', 0, null);
|
||||
return info.get_display_name();
|
||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_SUPPORTED)) {
|
||||
} catch(e if e instanceof Gio.IOErrorEnum) {
|
||||
return this.file.get_basename();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user