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
This commit is contained in:
parent
0b149a941d
commit
6207c68439
@ -174,8 +174,15 @@ function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _loadExtensionsIn(dir, type) {
|
function _loadExtensionsIn(dir, type) {
|
||||||
let fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
|
let fileEnum;
|
||||||
let file, info;
|
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) {
|
while ((info = fileEnum.next_file(null)) != null) {
|
||||||
let fileType = info.get_file_type();
|
let fileType = info.get_file_type();
|
||||||
if (fileType != Gio.FileType.DIRECTORY)
|
if (fileType != Gio.FileType.DIRECTORY)
|
||||||
|
Loading…
Reference in New Issue
Block a user