From 056b3ecfa4c3d185acf2d161955c92e7452cfa93 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 23 Mar 2016 11:17:46 +0100 Subject: LocalStoreAccessor::stat: Handle ENOTDIR Closes https://github.com/NixOS/hydra/pull/286. --- src/libstore/local-fs-store.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore') diff --git a/src/libstore/local-fs-store.cc b/src/libstore/local-fs-store.cc index 8b72c05b7b90..303c3af27b8d 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); } -- cgit 1.4.1