]> git.eshelyaron.com Git - emacs.git/commit
Fix expand-file-name symlink-to-dir bug
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 26 Aug 2020 20:25:35 +0000 (13:25 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 26 Aug 2020 20:27:56 +0000 (13:27 -0700)
commit14fb657ba82da346d36f05f88da26f1c5498b798
treeca60dbe7a621ad7a5d00b1a28f489caf15e4896a
parentff864be694247e5f6c8732afcbaeb1c0a8a8a124
Fix expand-file-name symlink-to-dir bug

Problem reported by Yegor Timoshenko (Bug#26911),
and I ran into it myself recently in normal-top-level.
* doc/lispref/files.texi (File Name Expansion), etc/NEWS: Mention this.
* src/fileio.c (Fexpand_file_name): Expand "/a/b/." to "/a/b/" not
"/a/b", to avoid misinterpreting a symlink "/a/b".  Similarly,
expand "/a/b/c/.." to "/a/b/" not "/a/b".
* test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name):
Adjust to match new behavior.
(tramp-test05-expand-file-name-relative): This test now succeeds,
at least on Fedora 31.
* test/src/fileio-tests.el:
(fileio-tests--expand-file-name-trailing-slash) New test.
doc/lispref/files.texi
etc/NEWS
src/fileio.c
test/lisp/net/tramp-tests.el
test/src/fileio-tests.el