bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50572: 28.0.50; [PATCH] fix VC to find the responsible backend with


From: Lars Ingebrigtsen
Subject: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible backend with the most specific path.
Date: Thu, 11 Nov 2021 03:56:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> We can always use "/\\" as SEPARATORS on MS-Windows, can't we?

I was wondering about that -- are both of those characters disallowed in
file name components on Windows?  If so, then yes.  What would be the
test to identify the systems where this is the case?

> Alternatively, we could loop with file-name-directory, I guess.

That's what the current implementation does, and it's slow (since it
consults the file name handlers).

> But if we want a function that returns the "depth" of a file in a
> filesystem, then it will need to call expand-file-name internally
> anyway, for the same reason I point out above, right?

Yes.  This function can be used as a component in that calculation, but
if that's the purpose of the call, then the caller has to make the file
name non-relative first.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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