diff options
-rw-r--r-- | src/libstore/gc.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index e5836150c..74c208390 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -115,7 +115,10 @@ Path addPermRoot(StoreAPI & store, const Path & _storePath, % gcRoot % rootsDir); } - makeSymlink(gcRoot, storePath); + if (baseNameOf(gcRoot) == baseNameOf(storePath)) + writeFile(gcRoot, ""); + else + makeSymlink(gcRoot, storePath); } /* Check that the root can be found by the garbage collector. |