static char *
dired_realpath(const char *file)
{
- char *result = xmalloc_atomic(4096);
+ char *result = xmalloc_atomic(4096);
if ( realpath(file, result) == NULL ) {
xfree(result);
* check against the bloom filter.
*/
canon_name = CANONICALISE_FILENAME(statnam);
-
+
if (canon_name) {
/* now, recycle full name */
fullname = make_ext_string(
- With the former variant it is NOT possible to have
the trivial filenames on the result list, since a
match against "^[.]$" would exclude everything, while
- actually it was likely meant to _solely_ exclude "."
+ actually it was likely meant to _solely_ exclude "."
from the result list
- Furthermore, we _MUST_ traverse in preorder,
otherwise there is the possibility that pathnames are
} else if (EQ(result_type, Qdesc_sorted_list)) {
final_result = Fdllist_to_list(result);
final_result = Fsort(final_result, Qstring_greaterp);
- } else if (EQ(result_type, Qt) || EQ(result_type, Qlist)) {
+ } else if (!NILP(result_type) || EQ(result_type, Qlist)) {
final_result = Fdllist_to_list(result);
}
The two latter types can be useful if you plan to sort the result
yourself, or want to feed the result to further processing.
+For compatibility with XEmacs' NOSORT argument to this function,
+RESULT-TYPE can also be any non-nil value. In that case it will
+return an unsorted list. (http://issues.sxemacs.org/show_bug.cgi?id=163)
+
Optional argument FILES-ONLY can be one of:
- t to return only files and symlinks in DIRECTORY
- nil (default) to return all entries (files, symlinks, and
maximal recursion depth, use 0 to emulate old `directory-files'.
Optional argument SYMLINK-IS-FILE specifies whether symlinks
-should be resolved \(which is the default behaviour\) or whether
+should be resolved \(which is the default behaviour\) or whether
they are treated as ordinary files \(non-nil\), in the latter
case symlinks to directories are not recurred.
==
XSTRING_CHAR_LENGTH(bestmatch)))
/* If there is more than one exact match aside from
- case, and one of them is exact including case,
- prefer that one. */
+ case, and one of them is exact including case,
+ prefer that one. */
&& 0 > scmp_1(p2,
XSTRING_DATA(file),
file_name_length, 0)