var dirname = this.resolve_path(
this.resolve_path_combine_path(this.firstPath(),in_path));
- GLib.debug("SCAN %s\n", dirname);
+ GLib.debug("SCAN %s", dirname);
// scan the directory for files -- ending with vala || c
while ((next_file = file_enum.next_file(null)) != null) {
var fn = next_file.get_display_name();
- GLib.debug("SCAN %s - checking %s\n", dirname, fn);
-
+ GLib.debug("SCAN ADD %s - checking %s\n", dirname, fn);
+ if (!GLib.FileUtils.test(in_path + "/" + fn, GLib.FileTest.IS_REGULAR)) {
+ continue;
+ }
ret.add(in_path + "/" + fn);
// any other valid types???
{
var allfiles = this.filesAll(in_path);
var ret = new Gee.ArrayList<string>();
-
+ GLib.debug("SCAN %s - %d files",in_path, allfiles.size);
for (var i = 0; i < allfiles.size; i ++) {
var fn = allfiles.get(i);
try {
if (Regex.match_simple("\\.vala\\.c$", fn)) {
+ GLib.debug("SKIP %s - vala.c",fn);
+
continue;
}
if (Regex.match_simple("\\.bjs$", fn)) {
+ GLib.debug("SKIP %s - .bjs",fn);
continue;
}
if (Regex.match_simple("\\.o$", fn)) {
+ GLib.debug("SKIP %s - .o",fn);
continue;
}
- if (Regex.match_simple("~$", fn)) {
+ if (Regex.match_simple("\\~$", fn)) {
+ GLib.debug("SKIP %s - ~",fn);
continue;
}
- if (Regex.match_simple("^.", GLib.File.get_basename(fn))) {
+
+ if (Regex.match_simple("^\\.", GLib.Path.get_basename(fn))) {
+ GLib.debug("SKIP %s - hidden",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) {
+ GLib.debug("SKIP %s - .vala (got bjs)",fn);
continue;
}
-
+ GLib.debug("ADD %s",fn);
ret.add( fn);
continue;
}
var vv = (new Regex("\\.c$")).replace( fn, fn.length, 0, ".vala");
if (allfiles.index_of( vv) > -1) {
+ GLib.debug("SKIP %s - .c (got vala)",fn);
continue;
}
+ GLib.debug("ADD %s",fn);
ret.add( fn);
continue;
}
}
// not .c / not .vala /not .bjs.. -- other type of file..
// allow ???
-
+ GLib.debug("ADD %s",fn);
// add the 'c' file..
ret.add(fn);
} catch (Error e) {