LocalStoreAccessor::stat: Handle ENOTDIR

Closes https://github.com/NixOS/hydra/pull/286.
This commit is contained in:
Eelco Dolstra 2016-03-23 11:17:46 +01:00
parent 525c78a2c3
commit 056b3ecfa4

View file

@ -23,7 +23,7 @@ struct LocalStoreAccessor : public FSAccessor
struct stat 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);
}