var basename = this.firstPath();
// eg. base = /home/xxx/fred/blogs
// target = /home/xxx/fred/jones
+
+ // this does not work correctly...
var bb = basename;
var prefix = "";
while (true) {
if ( bb.length < target.length &&
target.substring(0, bb.length) == bb) {
+
return prefix + target.substring(bb.length +1);
}
if (bb.length < 1) {
try {
var file_enum = dir.enumerate_children(
- GLib.FileAttribute.STANDARD_DISPLAY_NAME,
+ GLib.FileAttribute.STANDARD_DISPLAY_NAME,
GLib.FileQueryInfoFlags.NONE,
null
);
continue;
}
-
-
+ if (Regex.match_simple("\\.vala\\.c$", fn)) {
+ continue;
+ }
if (Regex.match_simple("\\.c$", fn)) {
// if we have a vala file with the same name
{
ret += "/";
}
+ //print("combined path = %s", ret + second);
return ret + second;
}
public string resolve_path_times(string part, int times, string? clue = null)
public string[] vapidirs()
{
string[] ret = {};
- var sources = this.compilegroups.get("_default_").sources
+ var sources = this.compilegroups.get("_default_").sources;
for(var i =0; i< sources.size; i++) {
- var path = this.resolve_path(
- this.resolve_path_combine_path(this.firstPath(),sources.get(i)));
+ var path = this.resolve_path( this.firstPath(), sources.get(i));
if (Path.get_basename (path) == "vapi") {
print("Adding VAPIDIR: %s\n", path);