From 109cde670629a0f022de1d875b55bb2f5243b271 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 10 May 2005 14:56:10 +0000 Subject: * Ignore (with a warning) invalid garbage collector roots. --- src/libstore/gc.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libstore/gc.cc') diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index a2be189cc..634c61026 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -249,7 +249,12 @@ static void findRoots(const Path & path, bool recurseSymlinks, if (isInStore(target2)) { debug(format("found root `%1%' in `%2%'") % target2 % path); - roots.insert(toStorePath(target2)); + Path target3 = toStorePath(target2); + if (isValidPath(target3)) + roots.insert(target3); + else + printMsg(lvlInfo, format("skipping invalid root from `%1%' to `%2%'") + % path % target3); } else if (recurseSymlinks) { -- cgit v1.2.3