[gnome-shell] extensionUtils: Don't crash on startup for an empty directory
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensionUtils: Don't crash on startup for an empty directory
- Date: Tue, 10 Jul 2012 18:37:01 +0000 (UTC)
commit 1363d30f7915e4b4ae116dd6cd29ca215bd2cf72
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Jun 29 01:40:17 2012 -0400
extensionUtils: Don't crash on startup for an empty directory
https://bugzilla.gnome.org/show_bug.cgi?id=679099
js/misc/extensionUtils.js | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/js/misc/extensionUtils.js b/js/misc/extensionUtils.js
index cec24ba..40e001b 100644
--- a/js/misc/extensionUtils.js
+++ b/js/misc/extensionUtils.js
@@ -177,7 +177,14 @@ const ExtensionFinder = new Lang.Class({
log('Extension %s already installed in %s. %s will not be loaded'.format(uuid, existing.path, extensionDir.get_path()));
continue;
}
- let extension = createExtensionObject(uuid, extensionDir, type);
+
+ let extension;
+ try {
+ extension = createExtensionObject(uuid, extensionDir, type);
+ } catch(e) {
+ logError(e, 'Could not load extension %s'.format(uuid));
+ continue;
+ }
this.emit('extension-found', extension);
}
fileEnum.close(null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]