extensionUtils: Don't write to the filesystem on start

Create the potentially empty directory when we need to, not when we
don't.

https://bugzilla.gnome.org/show_bug.cgi?id=677586
This commit is contained in:
Jasper St. Pierre
2012-05-25 19:12:30 -04:00
parent 3ff51da529
commit feef35a8ca
2 changed files with 8 additions and 7 deletions

View File

@ -158,12 +158,6 @@ function installImporter(extension) {
function init() {
let userExtensionsPath = GLib.build_filenamev([global.userdatadir, 'extensions']);
userExtensionsDir = Gio.file_new_for_path(userExtensionsPath);
try {
if (!userExtensionsDir.query_exists(null))
userExtensionsDir.make_directory_with_parents(null);
} catch (e) {
logError(e, 'Could not create extensions directory');
}
}
function scanExtensionsInDirectory(callback, dir, type) {