GitMonitor.vala
authorAlan Knowles <alan@roojs.com>
Fri, 26 Oct 2018 02:34:43 +0000 (10:34 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 26 Oct 2018 02:34:43 +0000 (10:34 +0800)
GitMonitor.vala

index 41a1447..ef2bdca 100644 (file)
@@ -21,12 +21,13 @@ public class GitMonitorQueue : MonitorNamePathDir {
                        
                        var vpath_ar = this.dir.substring(GitMonitor.gitlive.length +1).split("/", 0);
                        
-                       if (vpath_ar[0].length < 1) {
+                       if (vpath_ar.length < 1 || vpath_ar[0].length < 1) {
 
                                this.gitpath = "";
                                this.vdir = "";
                                this.vname = "";
-                       }        
+                               return;
+                       }         
 
 
                        this.gitpath = GitMonitor.gitlive + "/" + vpath_ar[0];