From 74f75c855837bce7f48491e9ce8ac03794e5b40d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 12 Jan 2018 17:31:08 +0100 Subject: import, builtins.readFile: Handle diverted stores Fixes #1791 --- src/libexpr/eval.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/libexpr/eval.cc') diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 63de2d60a..087a95dde 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -375,6 +375,16 @@ void EvalState::checkURI(const std::string & uri) } +Path EvalState::toRealPath(const Path & path, const PathSet & context) +{ + // FIXME: check whether 'path' is in 'context'. + return + !context.empty() && store->isInStore(path) + ? store->toRealPath(path) + : path; +}; + + void EvalState::addConstant(const string & name, Value & v) { Value * v2 = allocValue(); -- cgit v1.2.3