[the-board] [model] Fix warning about invalid cancellable when creating directory



commit fbcf9a5aaec3e40304c2c092a4c0cda7c06c2d91
Author: Lucas Rocha <lucasr gnome org>
Date:   Sat Jul 23 18:37:46 2011 +0100

    [model] Fix warning about invalid cancellable when creating directory

 src/js/model/pageManager.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/js/model/pageManager.js b/src/js/model/pageManager.js
index 39c5afa..d17a06a 100644
--- a/src/js/model/pageManager.js
+++ b/src/js/model/pageManager.js
@@ -173,14 +173,14 @@ PageManager.prototype = {
                                                 this._onPagesDirMonitorChanged));
     },
 
-    _ensureDirectory : function(dir) {
+    _ensureDirectory : function(dir, cancellable) {
         // FIXME: we're doing this synchronously which is not a
         // good idea in general for IO stuff. This should probably
         // be async
 
         try {
             log('PageManager: make_directory_with_parents ' + dir.get_path());
-            dir.make_directory_with_parents(this._pageListingCancellable);
+            dir.make_directory_with_parents(cancellable);
             this._finishLoading();
         } catch(e) {
             log('PageManager: failed make_directory_with_parents ' + e);
@@ -330,7 +330,7 @@ PageManager.prototype = {
             log('PageManager: failed to read pages file');
 
             let dir = GIO.file_new_for_path(this._userDir);
-            this._ensureDirectory(dir);
+            this._ensureDirectory(dir, this._pagesFileLoadingCancellable);
 
             // It's possible that the pages file is not present but
             // we might have existing page files in the pages directory
@@ -383,7 +383,7 @@ PageManager.prototype = {
         } catch (e) {
             // maybe this is because the directory doesn't exist yet
             // try to create the directory in that case
-            this._ensureDirectory(dir);
+            this._ensureDirectory(dir, this._pageListingCancellable);
             return;
         }
 



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