[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Function to normalize windows file name
From: |
Eli Zaretskii |
Subject: |
Re: Function to normalize windows file name |
Date: |
Tue, 16 Feb 2021 17:49:01 +0200 |
> From: yyoncho <yyoncho@gmail.com>
> Date: Tue, 16 Feb 2021 15:49:38 +0200
> Cc: emacs-devel <emacs-devel@gnu.org>
>
> The issue is the letter case because for one reason or another we often end
> up with file names being
> downcased. Apparently, file-truename is able to fix that issue(I was under
> the impression that it does not
> work that way).
Yes, file-truename is the solution for the letter-case issue.
However, if the problem to solve is that you compare file names as
strings, and that's why downcasing gets in the way, I'd like to point
out a few related aspects:
. first, file names aren't supposed to be downcased in Emacs, at
least not by default, so figuring out why this happens could solve
the issue more cleanly (file-truename can be expensive)
. if there's no simple way to prevent downcasing, you could either
compare file names case-insensitively or use file-equal-p