[gnome-shell] extensionSystem: Don't try to make the user extensinons dir if it exists



commit 4fa8e2b59d50e4d21a75be0184e478809a2da338
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Aug 26 17:33:52 2011 -0400

    extensionSystem: Don't try to make the user extensinons dir if it exists
    
    this removes the "Error invoking Gio.make_directory_with_parents: Error
    creating directory: File exists" spam from the Errors tab of the Looking
    Glass

 js/ui/extensionSystem.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index 38eeea3..5941d93 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -392,7 +392,8 @@ function init() {
     let userExtensionsPath = GLib.build_filenamev([global.userdatadir, 'extensions']);
     userExtensionsDir = Gio.file_new_for_path(userExtensionsPath);
     try {
-        userExtensionsDir.make_directory_with_parents(null);
+        if (!userExtensionsDir.query_exists(null))
+            userExtensionsDir.make_directory_with_parents(null);
     } catch (e) {
         global.logError('' + e);
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]