GitRepo.vala
authorAlan Knowles <alan@roojs.com>
Mon, 12 May 2014 02:17:12 +0000 (10:17 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 12 May 2014 02:17:12 +0000 (10:17 +0800)
GitRepo.vala

index d7333d8..d1638cd 100644 (file)
@@ -38,11 +38,15 @@ public class GitRepo : Object
     public static Array<GitRepo> list()
     {
         
-        if (Repo._list !== false) {
-            return Repo._list;
+        if (GitRepo.list_cache !== null) {
+            return GitRepo.list_cache;
         }
-        Repo._list  = [];
-        var dir = GLib.get_home_dir() + '/gitlive';
+        
+        GitRepo.list_cache = new Array<GitRepo>();
+        
+        var dir = Enviroment.get_home_dir() + '/gitlive';
+        
+        
         var ar = File.list(dir );
         print(JSON.stringify(ar));
         ar.forEach(function(f) {