src/Resources.vala
authorAlan Knowles <alan@roojs.com>
Fri, 24 Apr 2015 07:54:15 +0000 (15:54 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 24 Apr 2015 07:54:15 +0000 (15:54 +0800)
src/Resources.vala

index d529a6b..ddc77ad 100644 (file)
@@ -32,7 +32,7 @@ public class ResourcesItem : Object {
                if (target.contains("*")) {
                        return;
                }
-               var tfn = BuilderApplication.configDirectory() + "/resources/" + target;
+               var tfn = BuilderApplication.configDirectory() + "/resources/" + this.target;
                if (!GLib.FileUtils.test (GLib.Path.get_dirname(tfn), FileTest.IS_REGULAR)) {
                        return;
                }
@@ -204,6 +204,10 @@ public class Resources : Object
     
     public void fetchResourceFrom(ResourcesItem item)
     {
+               if (item.new_sha != "" && item.new_sha == item.cur_sha) {
+                       this.fetchNext();
+                       return;
+               }
                 
                // fetch...
                print("downloading %s \nto : %s\n", item.src,item.target);