From dfb4d588c417dce3bd4983c3247bf4cd7e7274d3 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 26 May 2015 13:45:36 +0800 Subject: [PATCH] src/Project/Gtk.vala --- src/Project/Gtk.vala | 48 +++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/src/Project/Gtk.vala b/src/Project/Gtk.vala index e6c32561c..13e414a38 100644 --- a/src/Project/Gtk.vala +++ b/src/Project/Gtk.vala @@ -216,34 +216,36 @@ namespace Project { for (var i = 0; i < allfiles.size; i ++) { var fn = allfiles.get(i); - if (Regex.match_simple("\\.vala$", fn)) { - ret.add( fn); - continue; - } - // vala.c -- ignore.. - if (Regex.match_simple("\\.vala\\.c$", fn)) { - continue; - } - // 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 { - vv = (new Regex("\\.c$")).replace( fn, fn, 0, ".vala"); - } catch (Error e) { - continue; - } + if (Regex.match_simple("\\.vala$", fn)) { + ret.add( fn); + continue; + } + // vala.c -- ignore.. + if (Regex.match_simple("\\.vala\\.c$", fn)) { + continue; + } + // not a c file... + if (!Regex.match_simple("\\.c$", fn)) { + continue; + } + + // is the c file the same as a vala file... + + + + var vv = (new Regex("\\.c$")).replace( fn, fn, 0, ".vala"); + - if (allfiles.index_of( vv) > -1) { + if (allfiles.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) => { -- 2.39.2