From: Alan Knowles Date: Tue, 26 May 2015 05:46:07 +0000 (+0800) Subject: src/Project/Gtk.vala X-Git-Url: http://git.roojs.org/?p=app.Builder.js;a=commitdiff_plain;h=088ff07867a8bb803cd226fab188b1b17ac7a235 src/Project/Gtk.vala --- diff --git a/src/Project/Gtk.vala b/src/Project/Gtk.vala index 13e414a38..0c29891a0 100644 --- a/src/Project/Gtk.vala +++ b/src/Project/Gtk.vala @@ -263,39 +263,43 @@ namespace Project { for (var i = 0; i < allfiles.size; i ++) { var fn = cfiles.get(i); - if (Regex.match_simple("\\.vala\\.c$", fn)) { - continue; - } - if (Regex.match_simple("\\.bjs\\.c$", fn)) { - continue; - } - - if (Regex.match_simple("\\.vala$", fn)) { - ret.add( fn); - continue; - } - // vala.c -- ignore.. - - // not a c file... - if (!Regex.match_simple("\\.c$", fn)) { - continue; - } - - // is the c file the same as a vala file... - - var vv = fn; try { + + if (Regex.match_simple("\\.vala\\.c$", fn)) { + continue; + } + + if (Regex.match_simple("\\.bjs$", fn)) { + continue; + } + + if (Regex.match_simple("\\.vala$", fn)) { + ret.add( fn); + continue; + } + // vala.c -- ignore.. + + // not a c file... + if (!Regex.match_simple("\\.c$", fn)) { + continue; + } + + // is the c file the same as a vala file... + + var vv = fn; + vv = (new Regex("\\.c$")).replace( fn, fn, 0, ".vala"); - } catch (Error e) { - continue; - } + - if (ret.index_of( vv) > -1) { + if (ret.index_of( vv) > -1) { + continue; + } + // add the 'c' file.. + ret.add(fn); + } catch (Error e) { continue; } - // add the 'c' file.. - ret.add(fn); } // sort. ret.sort((fa,fb) => {