null/demo.local.php
[gitlive] / Monitor.js
index f6bf7f4..3e8760e 100644 (file)
@@ -109,7 +109,10 @@ Monitor.prototype = {
         var f = Gio.file_new_for_path(path);
             //var cancel = new Gio.Cancellable ();
         if (depth > 0) {     
+
             var fm = f.monitor(2,null); //Gio.FileMonitorFlags.SEND_MOVED
+
+
             
             XObject.isSeed ?  fm.signal.changed.connect(fn) : fm.connect('changed',fn);
             this.monitors.push(fm);
@@ -122,17 +125,18 @@ Monitor.prototype = {
         //    this.initRepo(path);
         //}
         
-        
-        var file_enum = f.enumerate_children(
+         var file_enum = f.enumerate_children(
             Gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME + ','+ 
             Gio.FILE_ATTRIBUTE_STANDARD_TYPE,
             Gio.FileQueryInfoFlags.NONE,
             null);
         
-       var next_file;
+        var next_file;
         
         while ((next_file = file_enum.next_file(null)) != null) {
          
+            //print("got a file " + next_file.sudo () + '?=' + Gio.FileType.DIRECTORY);
+            
             if (next_file.get_file_type() != Gio.FileType.DIRECTORY) {
                 next_file = null;
                 continue;
@@ -149,8 +153,12 @@ Monitor.prototype = {
             }
             var sp = path+'/'+next_file.get_display_name();
             // skip modules.
-           
+            //print("got a file : " + sp);
+         
             next_file = null;
+            
+            
+            
             this.monitor(sp, fn, depth + 1);
             
         }