forked from lix-project/lix
LocalStoreAccessor::stat: Handle ENOTDIR
Closes https://github.com/NixOS/hydra/pull/286.
This commit is contained in:
parent
525c78a2c3
commit
056b3ecfa4
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ struct LocalStoreAccessor : public FSAccessor
|
||||||
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (lstat(path.c_str(), &st)) {
|
if (lstat(path.c_str(), &st)) {
|
||||||
if (errno == ENOENT) return {Type::tMissing, 0, false};
|
if (errno == ENOENT || errno == ENOTDIR) return {Type::tMissing, 0, false};
|
||||||
throw SysError(format("getting status of ‘%1%’") % path);
|
throw SysError(format("getting status of ‘%1%’") % path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue