[gnome-shell-extensions/gnome-3-6] PlacesMenu: don't fail for GIO errors getting the file name
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/gnome-3-6] PlacesMenu: don't fail for GIO errors getting the file name
- Date: Wed, 7 Nov 2012 16:44:17 +0000 (UTC)
commit 5673baa6b5b2ec2b2678fdf102008e6167bc352c
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Wed Nov 7 17:41:52 2012 +0100
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.
extensions/places-menu/placeDisplay.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js
index 8984d06..ab7211c 100644
--- a/extensions/places-menu/placeDisplay.js
+++ b/extensions/places-menu/placeDisplay.js
@@ -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();
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]