aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-23 11:17:46 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-03-23 11:17:46 +0100
commit056b3ecfa4c3d185acf2d161955c92e7452cfa93 (patch)
tree78fcf023b46ae2bfa9ba5b53ba08f96e0354be7d
parent525c78a2c3a1da5b673d11478d3b1693a7579508 (diff)
LocalStoreAccessor::stat: Handle ENOTDIR
Closes https://github.com/NixOS/hydra/pull/286.
-rw-r--r--src/libstore/local-fs-store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc
index 8b72c05b7..303c3af27 100644
--- a/src/libstore/local-fs-store.cc
+++ b/src/libstore/local-fs-store.cc
@@ -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);
}