@@ -143,10 +143,9 @@ static SourcePath realisePath(EvalState & state, const PosIdx pos, Value & v, st
143143 auto path = state.coerceToPath (noPos, v, context, " while realising the context of a path" );
144144
145145 try {
146- if (!context.empty () && path.accessor == state.rootFS ) {
146+ if (!context.empty () && path.accessor == state.storeFS ) {
147147 auto rewrites = state.realiseContext (context);
148- auto realPath = state.toRealPath (rewriteStrings (path.path .abs (), rewrites), context);
149- path = {path.accessor , CanonPath (realPath)};
148+ path = {path.accessor , CanonPath (rewriteStrings (path.path .abs (), rewrites))};
150149 }
151150 return resolveSymlinks ? path.resolveSymlinks (*resolveSymlinks) : path;
152151 } catch (Error & e) {
@@ -2481,19 +2480,11 @@ static void addPath(
24812480 try {
24822481 StorePathSet refs;
24832482
2484- if (path.accessor == state.rootFS && state.store ->isInStore (path.path .abs ())) {
2483+ if (path.accessor == state.storeFS && state.store ->isInStore (path.path .abs ())) {
24852484 // FIXME: handle CA derivation outputs (where path needs to
24862485 // be rewritten to the actual output).
24872486 auto rewrites = state.realiseContext (context);
2488- path = {state.rootFS , CanonPath (state.toRealPath (rewriteStrings (path.path .abs (), rewrites), context))};
2489-
2490- try {
2491- auto [storePath, subPath] = state.store ->toStorePath (path.path .abs ());
2492- // FIXME: we should scanForReferences on the path before adding it
2493- refs = state.store ->queryPathInfo (storePath)->references ;
2494- path = {state.rootFS , CanonPath (state.store ->toRealPath (storePath) + subPath)};
2495- } catch (Error &) { // FIXME: should be InvalidPathError
2496- }
2487+ path = {path.accessor , CanonPath (rewriteStrings (path.path .abs (), rewrites))};
24972488 }
24982489
24992490 std::unique_ptr<PathFilter> filter;
0 commit comments