From 8080b83ade18479ea4f882dd05f27f755020d1f6 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 12 May 2014 10:17:12 +0800 Subject: [PATCH] GitRepo.vala --- GitRepo.vala | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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) { -- 2.39.2