X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=GitRepo.vala;h=d1638cd687c4d10ba3a253fd5918fa32adc1fc2b;hb=8080b83ade18479ea4f882dd05f27f755020d1f6;hp=d7333d80644a2f2727af2e52ad088a1b847c3552;hpb=57b1e6b4999ab1ac5f1be830ddc704efca81b2a4;p=gitlive diff --git a/GitRepo.vala b/GitRepo.vala index d7333d80..d1638cd6 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -38,11 +38,15 @@ public class GitRepo : Object public static Array 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(); + + var dir = Enviroment.get_home_dir() + '/gitlive'; + + var ar = File.list(dir ); print(JSON.stringify(ar)); ar.forEach(function(f) {