extensionUtils: don't log verbosely on missing extension directory

A missing extension directory isn't worth debug spew, so check
if the error when reading the extension directory is NOT_FOUND,
and if so, suppress output.

https://bugzilla.gnome.org/show_bug.cgi?id=685466
This commit is contained in:
Owen W. Taylor 2012-10-04 00:57:06 -04:00
parent b99bb3d4bb
commit 9395f310d6

View File

@ -161,6 +161,7 @@ const ExtensionFinder = new Lang.Class({
try { try {
fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null); fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
} catch(e) { } catch(e) {
if (e.domain != Gio.io_error_quark() || e.code != Gio.IOErrorEnum.NOT_FOUND)
logError(e, 'Could not enumerate extensions directory'); logError(e, 'Could not enumerate extensions directory');
return; return;
} }