diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-11 02:27:45 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-07-11 02:27:45 +0000 |
commit | 442d43178ba47c2312b77026f88a236846e7c425 (patch) | |
tree | d165745929148ba16615b8c34cb95068f5fda29b /src/nix-store | |
parent | a7884970c57f821e274fba20473d6fcce95ff6c8 (diff) | |
parent | 8efa23bb996161af74f89401902450e51e9d4b54 (diff) |
Merge remote-tracking branch 'upstream/master' into optional-derivation-output-storepath
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/nix-store.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 2a2f16ac1..39a47e19a 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -174,10 +174,10 @@ static void opAdd(Strings opFlags, Strings opArgs) store. */ static void opAddFixed(Strings opFlags, Strings opArgs) { - auto recursive = FileIngestionMethod::Flat; + auto method = FileIngestionMethod::Flat; for (auto & i : opFlags) - if (i == "--recursive") recursive = FileIngestionMethod::Recursive; + if (i == "--recursive") method = FileIngestionMethod::Recursive; else throw UsageError("unknown flag '%1%'", i); if (opArgs.empty()) @@ -187,7 +187,7 @@ static void opAddFixed(Strings opFlags, Strings opArgs) opArgs.pop_front(); for (auto & i : opArgs) - cout << fmt("%s\n", store->printStorePath(store->addToStore(std::string(baseNameOf(i)), i, recursive, hashAlgo))); + std::cout << fmt("%s\n", store->printStorePath(store->addToStoreSlow(baseNameOf(i), i, method, hashAlgo).path)); } |