gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Small truename bug, with patch


From: Richard M Kreuter
Subject: [Gcl-devel] Small truename bug, with patch
Date: Sat, 18 Dec 2004 22:26:30 -0500
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (berkeley-unix)

Hi,

In 2.6.5 and 2.7.0, when truename is called on a pathname that names a
symbolic link, it appends the link target's namestring to the
directory part of the pathname's namestring, then tries to chdir into
the directory part of the resultant namestring.  This causes truename
to fail when its argument is a pathname with a non-empty directory
component that names a symbolic link to an absolute file name.  Here's
what it looks like:

$ pwd
/tmp/zzz
$ ls -l
total 0
-rw-r--r--  1 kreuter users  0 Dec 18 22:07 a
lrwxr-xr-x  1 kreuter users 10 Dec 18 22:07 b -> /tmp/zzz/a
$ gcl
<snip>
>(truename "b")

#P"/tmp/zzz/a"

>(truename "../zzz/b")

Error in EVAL [or a callee]: Cannot get the truename of #P"../zzz/b".

Fast links are on: do (use-fast-links nil) for debugging
Broken at TRUENAME.  Type :H for Help.
 1 (Continue) Return to top level.
dbl:>>1

Top level.
>(truename "/tmp/zzz/b")

Error in EVAL [or a callee]: Cannot get the truename of #P"/tmp/zzz/b".

Fast links are on: do (use-fast-links nil) for debugging
Broken at TRUENAME.  Type :H for Help.
 1 (Continue) Return to top level.
dbl:>>1

Top level.

Attached is a tiny patch that fixes this.

--
Richard

Attachment: truename.patch
Description: patch truenames to deal absolute symlink targets


reply via email to

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