From c0861838432ea9d8e5ea5750aadfbc59ebd6f3b4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 22 Oct 2013 11:39:10 +0200 Subject: [PATCH] For auto roots, show the intermediate link I.e. "nix-store -q --roots" will now show (for example) /home/eelco/Dev/nixpkgs/result rather than /nix/var/nix/gcroots/auto/53222qsppi12s2hkap8dm2lg8xhhyk6v --- src/libstore/gc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 37ca6be4b8..f32329960c 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -329,7 +329,7 @@ static void findRoots(StoreAPI & store, const Path & path, Roots & roots) struct stat st2 = lstat(target); if (!S_ISLNK(st2.st_mode)) return; Path target2 = readLink(target); - if (isInStore(target2)) foundRoot(store, path, target2, roots); + if (isInStore(target2)) foundRoot(store, target, target2, roots); } } }