From cbcc5524f405d60b7b6e4d20b26b05aef2f045f1 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 1 Jun 2015 11:26:21 +0800 Subject: [PATCH] GitMonitor.vala --- GitMonitor.vala | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/GitMonitor.vala b/GitMonitor.vala index 8dd7f5bb..20311eb9 100644 --- a/GitMonitor.vala +++ b/GitMonitor.vala @@ -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(); 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; } -- 2.39.2