aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dired.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dired.c b/src/dired.c
index d21cb65c9d3..4b6b94d8122 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -572,6 +572,9 @@ file_name_completion (file, dirname, all_flag, ver_flag)
572 elt = XCAR (tem); 572 elt = XCAR (tem);
573 if (!STRINGP (elt)) 573 if (!STRINGP (elt))
574 continue; 574 continue;
575 /* Need to encode ELT, since scmp compares unibyte
576 strings only. */
577 elt = ENCODE_FILE (elt);
575 elt_len = XSTRING (elt)->size - 1; /* -1 for trailing / */ 578 elt_len = XSTRING (elt)->size - 1; /* -1 for trailing / */
576 if (elt_len <= 0) 579 if (elt_len <= 0)
577 continue; 580 continue;
@@ -598,6 +601,9 @@ file_name_completion (file, dirname, all_flag, ver_flag)
598 { 601 {
599 elt = XCAR (tem); 602 elt = XCAR (tem);
600 if (!STRINGP (elt)) continue; 603 if (!STRINGP (elt)) continue;
604 /* Need to encode ELT, since scmp compares unibyte
605 strings only. */
606 elt = ENCODE_FILE (elt);
601 skip = len - XSTRING (elt)->size; 607 skip = len - XSTRING (elt)->size;
602 if (skip < 0) continue; 608 if (skip < 0) continue;
603 609