* dirOf: return "/", not "", for paths in the root directory. Fixes NIX-26.
This commit is contained in:
parent
04be39734f
commit
5b527901ae
2 changed files with 3 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue