From 99db7a30eca37325f2638dfe359f34917bdcc8d4 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Wed, 17 Feb 2010 20:52:52 +0100 Subject: [PATCH] Remove debug message. In DIRECTORY the filenames were not checked against the mask. --- src/c/unixfsys.d | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/c/unixfsys.d b/src/c/unixfsys.d index 3f0afed4b..f9b1604cf 100644 --- a/src/c/unixfsys.d +++ b/src/c/unixfsys.d @@ -318,8 +318,8 @@ file_truename(cl_object pathname, cl_object filename) cl_object kind; if (Null(pathname)) { if (Null(filename)) { - printf("Both FILENAME and PATHNAME are null!\n",0); - abort(); + ecl_internal_error("file_truename:" + " both FILENAME and PATHNAME are null!"); } pathname = cl_pathname(filename); } else if (Null(filename)) { @@ -778,7 +778,9 @@ OUTPUT: * of pathnames. BASEDIR is the truename of the current directory and it is * used to build these pathnames. */ -static cl_object +extern cl_object dir_files(cl_object base_dir, cl_object pathname); + +cl_object dir_files(cl_object base_dir, cl_object pathname) { cl_object all_files, output = Cnil; @@ -788,8 +790,8 @@ dir_files(cl_object base_dir, cl_object pathname) if (name == Cnil && type == Cnil) { return cl_list(1, base_dir); } - mask = ecl_make_pathname(Cnil, Cnil, Cnil, name, type, - pathname->pathname.version); + mask = ecl_make_pathname(Cnil, Cnil, Cnil, + name, type, pathname->pathname.version); for (all_files = list_directory(base_dir, NULL); !Null(all_files); all_files = ECL_CONS_CDR(all_files)) @@ -797,6 +799,9 @@ dir_files(cl_object base_dir, cl_object pathname) cl_object record = ECL_CONS_CAR(all_files); cl_object new = ECL_CONS_CAR(record); cl_object kind = ECL_CONS_CDR(record); + if (Null(cl_pathname_match_p(new, mask))) { + continue; + } if (kind != @':directory') { output = CONS(new, output); }