emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 400df210ce0: Fix last change of 'delete-file'


From: Eli Zaretskii
Subject: Re: master 400df210ce0: Fix last change of 'delete-file'
Date: Thu, 10 Aug 2023 18:00:16 +0300

> From: Robert Pluim <rpluim@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 10 Aug 2023 16:41:01 +0200
> 
>     >> I was thinking of the opposite case, where someone has a personal file
>     >> handler with a regexp with an absolute path in it.
> 
>     Eli> That'd be a buggy file handler, I think, unless it also checks
>     Eli> default-directory.
> 
> The file handler isnʼt buggy: it never gets a chance to run.
> 
> Let me illustrate. Suppose we have an entry of
> 
> ("\\`/var/.*\\.txt" . my-file-handler)
> 
> in `file-name-handler-alist'.
> 
> (delete-file "foo.txt") when `default-directory' is "/var" would
> previously result in `my-file-handler' being called. Now itʼs not
> called at all, and the deletion is handled by `delete-file-internal'

But the same would be true for substitute-in-file-name, for example,
and for directory-file-name, and file-name-as-directory, and several
other primitives, which call Ffind_file_name_handler without calling
expand-file-name before that.

But maybe I'm missing something here, so let's ask Michael (CC'ed) for
his opinion on this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]