diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-01-08T17·16+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-01-08T17·16+0000 |
commit | 04be39734f6a5fe2e724a0c7b813ea1dd6ed3a29 (patch) | |
tree | fe0ac999b15d1dd39a201c24fd480b5ce3f7e317 /src/libutil/util.hh | |
parent | 0f8d3c871bfad0f83f4469c26aaa37927a525fe0 (diff) |
* Resolve all symlink components in the location of the temporary
build directory (TMPDIR, i.e., /tmp). Fixes NIX-26.
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 6 |
1 files changed, 4 insertions, 2 deletions
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 |