From c82f8a995bb1c9dd5f6b772454f8c52f76677389 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 28 Apr 2017 11:02:10 +0200 Subject: [PATCH] places-menu: report errors for mounting of volumes When launching an application for an uri we detect the case that the volume is not mounted and try to mount it. If this fails we don't report any error, so there is no feedback for the user. --- extensions/places-menu/placeDisplay.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js index 3037900c..4f27bb6b 100644 --- a/extensions/places-menu/placeDisplay.js +++ b/extensions/places-menu/placeDisplay.js @@ -50,7 +50,13 @@ const PlaceInfo = new Lang.Class({ Gio.AppInfo.launch_default_for_uri_finish(result); } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_MOUNTED)) { this.file.mount_enclosing_volume(0, null, null, (file, result) => { - file.mount_enclosing_volume_finish(result); + try { + file.mount_enclosing_volume_finish(result); + } catch(e) { + Main.notifyError(_("Failed to mount volume for ā€œ%sā€").format(this.name), e.message); + return; + } + if (tryMount) { let callback = this._createLaunchCallback(launchContext, false); Gio.AppInfo.launch_default_for_uri_async(file.get_uri(),