aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/profiles.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-09-03 11:06:56 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-09-03 11:06:56 +0200
commitb74f5cdd2330ea1028eb6b04217bbe20c71a368b (patch)
treec1b6527a49b6958a07e84932492e07804859aaa6 /src/libstore/profiles.cc
parent94a043ff3b0e9de92bdb62372f9a82186d8e871c (diff)
createGeneration(): Take a StorePath
Diffstat (limited to 'src/libstore/profiles.cc')
-rw-r--r--src/libstore/profiles.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/profiles.cc b/src/libstore/profiles.cc
index 6862b42f0..e91dd781e 100644
--- a/src/libstore/profiles.cc
+++ b/src/libstore/profiles.cc
@@ -72,7 +72,7 @@ static void makeName(const Path & profile, GenerationNumber num,
}
-Path createGeneration(ref<LocalFSStore> store, Path profile, Path outPath)
+Path createGeneration(ref<LocalFSStore> store, Path profile, StorePath outPath)
{
/* The new generation number should be higher than old the
previous ones. */
@@ -82,7 +82,7 @@ Path createGeneration(ref<LocalFSStore> store, Path profile, Path outPath)
if (gens.size() > 0) {
Generation last = gens.back();
- if (readLink(last.path) == outPath) {
+ if (readLink(last.path) == store->printStorePath(outPath)) {
/* We only create a new generation symlink if it differs
from the last one.
@@ -105,7 +105,7 @@ Path createGeneration(ref<LocalFSStore> store, Path profile, Path outPath)
user environment etc. we've just built. */
Path generation;
makeName(profile, num + 1, generation);
- store->addPermRoot(store->parseStorePath(outPath), generation, false, true);
+ store->addPermRoot(outPath, generation, false, true);
return generation;
}