GNU bug report logs - #33564
Incorrect path canonicalisation

Previous Next

Package: emacs;

Reported by: Mattias Andrée <maandree <at> kth.se>

Date: Sat, 1 Dec 2018 20:06:02 UTC

Severity: normal

Tags: notabug

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 33564 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias Andrée <maandree <at> kth.se>
Cc: 33564 <at> debbugs.gnu.org
Subject: Re: bug#33564: Incorrect path canonicalisation
Date: Sat, 01 Dec 2018 22:30:49 +0200
tags 33564 notabug
thanks

> Date: Sat, 1 Dec 2018 21:04:50 +0100
> From: Mattias Andrée <maandree <at> kth.se>
> 
> 	cd
> 	mkdir -p 1/2
> 	cd 1/2
> 	echo 3 > ../../3
> 	ln -s ~ 4
> 	echo 5 > 5
> 	emacs 4/../5 # works, but shouldn't
> 	emacs 4/../$USER/3 # does not works, should

This is by design: expand-file-name doesn't follow symlinks.  It's
documented not to do that: see the doc string and the ELisp manual.

> On Linux, the proper way to get the canonical path
> for a file with the file descriptor $fd:

expand-file-name doesn't aim at yielding the canonical file name in
that sense.




This bug report was last modified 5 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.