[gnome-shell] extensions: Ignore extensions in directories without read permission
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensions: Ignore extensions in directories without read permission
- Date: Wed, 2 Mar 2011 15:01:07 +0000 (UTC)
commit 6207c68439a97027cf8464cc77533a095388677a
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Mar 2 14:39:07 2011 +0100
extensions: Ignore extensions in directories without read permission
Gio.enumerate_children() throws an exception if called for a directory
without read permissions. Catch this case to allow the shell to start.
https://bugzilla.gnome.org/show_bug.cgi?id=643663
js/ui/extensionSystem.js | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index 5773283..f2b88a5 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -174,8 +174,15 @@ function init() {
}
function _loadExtensionsIn(dir, type) {
- let fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
+ let fileEnum;
let file, info;
+ try {
+ fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
+ } catch (e) {
+ global.logError('' + e);
+ return;
+ }
+
while ((info = fileEnum.next_file(null)) != null) {
let fileType = info.get_file_type();
if (fileType != Gio.FileType.DIRECTORY)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]