From 04be39734f6a5fe2e724a0c7b813ea1dd6ed3a29 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 8 Jan 2006 17:16:03 +0000 Subject: * Resolve all symlink components in the location of the temporary build directory (TMPDIR, i.e., /tmp). Fixes NIX-26. --- src/libutil/util.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 9601e65b3c63..aac2acd1730b 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -64,8 +64,10 @@ string getEnv(const string & key, const string & def = ""); Path absPath(Path path, Path dir = ""); /* Canonicalise a path by removing all `.' or `..' components and - double or trailing slashes. */ -Path canonPath(const Path & path); + double or trailing slashes. Optionally resolves all symlink + components such that each component of the resulting path is *not* + a symbolic link. */ +Path canonPath(const Path & path, bool resolveSymlinks = false); /* Return the directory part of the given canonical path, i.e., everything before the final `/'. If the path is the root or an -- cgit 1.4.1