GitMonitor.vala
[gitlive] / GitMonitor.vala
index 8dd7f5b..20311eb 100644 (file)
@@ -142,7 +142,7 @@ public class GitMonitorQueue : MonitorNamePathDir {
                }
                public string fullpath()
                {
-                       return this.gitpath +  this.vdir  + this.vname;
+                       return this.gitpath + "/" + this.vname;
                }
                
                        
@@ -395,7 +395,7 @@ public class GitMonitor : Monitor
                                                }
                                                
                                                // if file exists, do not try and delete it.
-                                               if (FileUtils.test(cmd.vname, FileTest.EXISTS)) {
+                                               if (FileUtils.test(cmd.fullpath(), FileTest.EXISTS)) {
                                                        break;
                                                }
                                                
@@ -434,6 +434,9 @@ public class GitMonitor : Monitor
                        // if file was added, then removed, 
                        var remove_files_f = new Array<GitMonitorQueue>();
                        for(var ii = 0;ii < remove_files.length;ii++) {
+                               
+                               
+                               
                                if (GitMonitorQueue.indexOfAdd(add_files,  remove_files.index(ii).vname) > -1 ) {
                                        // in add and remove - do not remvove
                                        continue;
@@ -443,7 +446,9 @@ public class GitMonitor : Monitor
                        for(var ii = 0;ii < add_files.length;ii++) {
                                if (GitMonitorQueue.indexOfAdd(remove_files,  add_files.index(ii).vname) > -1 ) {
                                        // the add file is in the remove list, and it does not exist - do not add it..
-                                       if (!FileUtils.test(add_files.index(ii).vname, FileTest.EXISTS)) {
+                                       print("check exists ? %s\n",add_files.index(ii).fullpath());
+                                       
+                                       if (!FileUtils.test(add_files.index(ii).fullpath(), FileTest.EXISTS)) {
                                                        continue;
                                        }