src/Resources.vala
authorAlan Knowles <alan@roojs.com>
Fri, 24 Apr 2015 06:46:01 +0000 (14:46 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 24 Apr 2015 06:46:01 +0000 (14:46 +0800)
src/Resources.vala

index 1512ef1..e3e296d 100644 (file)
@@ -143,8 +143,15 @@ public class Resources : Object
            var message = new Soup.Message ("GET",  item.src );
         session.queue_message (message, (sess, mess) => {
                        
+                       if (item.target.contains('*')) {
+                               // then it's a directory listing in JSON, and we need to add any new items to our list..
+                               // it's used to fetch Editors (and maybe other stuff..)
+                       }
+                       
                        
                        var tfn = BuilderApplication.configDirectory() + "/resources/" + target;
+                       
+                       
                        // create parent directory if needed
                        if (!GLib.FileUtils.test (GLib.Path.get_dirname(tfn), FileTest.IS_DIR)) {
                                var f =  GLib.File.new_for_path(GLib.Path.get_dirname(tfn));
@@ -152,6 +159,8 @@ public class Resources : Object
                        }
                        
                        
+                       
+                       
                        // set data??? - if it's binary?
             FileUtils.set_contents(  tfn, (string) message.response_body.data );
             
@@ -173,6 +182,11 @@ public class Resources : Object
                                        break;
                        }
             
+            
+            
+            
+            
+            
             this.fetchNext();
              
         });