src/Project/Gtk.vala
[app.Builder.js] / src / Project / Gtk.vala
index ed0d890..a8712aa 100644 (file)
@@ -194,7 +194,9 @@ namespace Project {
                                        var fn = next_file.get_display_name();
                                        
                                        GLib.debug("SCAN %s - checking %s\n", dirname, fn);
-                                        
+                                       if (!GLib.FileUtils.text(in_path + "/" + fn, GLib.FileTest.IS_REGULAR)) {
+                                               continue;
+                                       }
                                        ret.add(in_path + "/" + fn);
                                         
                                        // any other valid types???
@@ -234,7 +236,7 @@ namespace Project {
                                        
                                         
                                        
-                                       var vv = (new Regex("\\.c$")).replace( fn, fn, 0, ".vala");
+                                       var vv = (new Regex("\\.c$")).replace( fn, fn.length, 0, ".vala");
                                
                                        
                                                
@@ -272,7 +274,15 @@ namespace Project {
                                        if (Regex.match_simple("\\.bjs$", fn)) {
                                                continue;
                                        }
-                                       
+                                       if (Regex.match_simple("\\.o$", fn)) {
+                                               continue;
+                                       }
+                                       if (Regex.match_simple("~$", fn)) {
+                                               continue;
+                                       }
+                                       if (Regex.match_simple("^.", GLib.File.get_basename(fn))) {
+                                               continue;
+                                       }
                                        if (Regex.match_simple("\\.vala$", fn)) {
                                                var vv = (new Regex("\\.vala$")).replace( fn, fn.length, 0, ".bjs");
                                                if (allfiles.index_of( vv) > -1) {