about summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-01-09T14·52+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-01-09T14·52+0000
commit5b527901ae625675f525dd65b82f90bcb2001afd (patch)
treeac6c1aeeb01aa5a3ef2d2a7732f0650b29a45fc9 /src/libmain
parent04be39734f6a5fe2e724a0c7b813ea1dd6ed3a29 (diff)
* dirOf: return "/", not "", for paths in the root directory. Fixes NIX-26.
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 709b6116a67e..a832344c9c49 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -65,7 +65,7 @@ void setLogType(string lt)
 void checkStoreNotSymlink(Path path)
 {
     struct stat st;
-    while (path.size()) {
+    while (path != "/") {
         if (lstat(path.c_str(), &st))
             throw SysError(format("getting status of `%1%'") % path);
         if (S_ISLNK(st.st_mode))