[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: directory-files and Tramp
From: |
Lars Hansen |
Subject: |
Re: directory-files and Tramp |
Date: |
Sat, 22 Feb 2003 23:38:59 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2.1) Gecko/20021130 |
I think it looks good: in the no-handler case, directory_files calls
directory_files_internal, which in turn calls expand-file-name on the
directory. So expand-file-name is called anyway.
But should the expand-file-name call in directory_files_internal be
removed after making sure that all callers do the expansion?
Sounds like a good idea. I seems directory_files_internal is called by
directory-files and
directory-files-and-attributes only. But the latter is missing a call to
expand-file-name, so
it must have the same problem as directory-files. So i think the changes
should be:
diff -c dired-original.c dired.c
*** dired-original.c Tue Feb 4 15:03:12 2003
--- dired.c Sat Feb 22 23:19:18 2003
***************
*** 153,159 ****
Ffuncall, and cause a GC. */
list = encoded_directory = dirfilename = Qnil;
GCPRO5 (match, directory, list, dirfilename, encoded_directory);
- directory = Fexpand_file_name (directory, Qnil);
dirfilename = Fdirectory_file_name (directory);
if (!NILP (match))
--- 153,158 ----
***************
*** 346,351 ****
--- 345,352 ----
{
Lisp_Object handler;
+ directory = Fexpand_file_name (directory, Qnil);
+
/* If the file name has special constructs in it,
call the corresponding file handler. */
handler = Ffind_file_name_handler (directory, Qdirectory_files);
***************
*** 379,384 ****
--- 380,387 ----
{
Lisp_Object handler;
+ directory = Fexpand_file_name (directory, Qnil);
+
/* If the file name has special constructs in it,
call the corresponding file handler. */
handler = Ffind_file_name_handler (directory,
Qdirectory_files_and_attributes);