[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expand-file-name leaves "/../" in expansions at times
From: |
Chong Yidong |
Subject: |
Re: expand-file-name leaves "/../" in expansions at times |
Date: |
Mon, 16 Apr 2007 22:32:11 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux) |
Diane Murray <address@hidden> writes:
> I have no idea if this is a bug or not, but sometimes
> `expand-file-name' returns a path with "/../" at the beginning of it.
> Below are a few simple examples.
C-h f expand-file-name RET
expand-file-name is a built-in function in `C source code'.
(expand-file-name name &optional default-directory)
Convert filename name to absolute, and canonicalize it.
Second arg default-directory is directory to start with if name is relative
(does not start with slash); if default-directory is nil or missing,
the current buffer's value of `default-directory' is used.
All your examples are consistent with this behavior. The important
thing is that DEFAULT-DIRECTORY is only consulted if the filename is
relative.
Also, note that (/../ == /).
- expand-file-name leaves "/../" in expansions at times, Diane Murray, 2007/04/16
- Re: expand-file-name leaves "/../" in expansions at times,
Chong Yidong <=
- Re: expand-file-name leaves "/../" in expansions at times, Jason Rumney, 2007/04/17
- Re: expand-file-name leaves "/../" in expansions at times, Jan Djärv, 2007/04/18
- Re: expand-file-name leaves "/../" in expansions at times, Richard Stallman, 2007/04/18
- Re: expand-file-name leaves "/../" in expansions at times, Glenn Morris, 2007/04/19
- Re: expand-file-name leaves "/../" in expansions at times, Miles Bader, 2007/04/19
- Re: expand-file-name leaves "/../" in expansions at times, Glenn Morris, 2007/04/19