Path: utzoo!utgpu!watmath!uunet!mcvax!ukc!etive!lfcs!paul From: paul@lfcs.ed.ac.uk (Paul Anderson) Newsgroups: gnu.emacs Subject: Pathnames & Symbolic links Message-ID: <1466@etive.ed.ac.uk> Date: 24 Feb 89 13:39:06 GMT Sender: news@etive.ed.ac.uk Reply-To: paul@lfcs.ed.ac.uk (Paul Anderson) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 32 The SunOS4.0 automounter is really useful, but it mounts NFS directories on temporary mount points and provides access to them via symbolic links. This means that getwd() returns file names with strange (and variable) directory components. This problem seems to be related to a more fundamental difficulty with symbolic links - quite often the "real" pathname (with no link components) is not really the one that you want to use. Eg. It must be common for people's home directories to be symbolic links, and this makes it very easy for gnu to have two buffers, on the same file, with different pathnames. Does anyone have any suggestions for handling these kind of problems? To fix the problem with the automounter, I have incorporated a version of getwd() which was posted to the net by Mark Kilgard. This looks up automounter path prefixes in the mount table and returns a more reasonable version of the pathname. I can post the diffs for this if there is enough interest. ------------------------------------------------------------------------------- Paul Anderson JANET: paul@uk.ac.ed.lfcs LFCS, Dept. of Computer Science UUCP: ..!mcvax!ukc!lfcs!paul University of Edinburgh ARPA: paul%lfcs.ed.ac.uk@nss.cs.ucl.ac.uk Edinburgh EH9 3JZ, UK. Tel: 031-667-1081 Ext 2788 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Paul Anderson JANET: paul@uk.ac.ed.lfcs LFCS, Dept. of Computer Science UUCP: ..!mcvax!ukc!lfcs!paul University of Edinburgh ARPA: paul%lfcs.ed.ac.uk@nss.cs.ucl.ac.uk