emacs-devel
[Top][All Lists]
Advanced

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

expand-file-name, DOS/Windows, and directory separator


From: Eric Abrahamsen
Subject: expand-file-name, DOS/Windows, and directory separator
Date: Tue, 15 Feb 2022 09:59:53 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Hi,

My reading of `expand-file-name' (I don't really speak C) is that, if we
run it over a file path produced by an external process on a Windows
machine -- meaning path strings where the directory separator might be a
backward slash -- it will normalize that separator to a unix-style
forward slash. It looks like fileio.c:1247 calls dostounix_filename, and
I'm assuming that's what that does.

Is that a correct assumption? Can I rely on that behavior? Again this
isn't a file path produced by an Emacs function like `directory-files',
but by an external process returning a list of file names into a process
buffer.

TIA,
Eric




reply via email to

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