diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-02-15 14:33:31 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-02-16 11:14:01 +0100 |
commit | aa5b83d93ce1b7bb67bf81ceda7ebf7706b1efa0 (patch) | |
tree | 95d60471883b8f865a0a0b9961eb6161b9b1d2ac /src/libfetchers/tarball.cc | |
parent | 2d6d9a28ebb17b1ba1fe0dc4d56b6aa311f94d39 (diff) |
InputScheme::fetch(): Return a StorePath instead of a Tree
Diffstat (limited to 'src/libfetchers/tarball.cc')
-rw-r--r-- | src/libfetchers/tarball.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc index c933475ca..74c8097ff 100644 --- a/src/libfetchers/tarball.cc +++ b/src/libfetchers/tarball.cc @@ -126,7 +126,7 @@ std::pair<Tree, time_t> downloadTarball( if (cached && !cached->expired) return { - Tree(store->toRealPath(cached->storePath), std::move(cached->storePath)), + Tree { .actualPath = store->toRealPath(cached->storePath), .storePath = std::move(cached->storePath) }, getIntAttr(cached->infoAttrs, "lastModified") }; @@ -163,7 +163,7 @@ std::pair<Tree, time_t> downloadTarball( immutable); return { - Tree(store->toRealPath(*unpackedStorePath), std::move(*unpackedStorePath)), + Tree { .actualPath = store->toRealPath(*unpackedStorePath), .storePath = std::move(*unpackedStorePath) }, lastModified, }; } @@ -225,10 +225,10 @@ struct TarballInputScheme : InputScheme return true; } - std::pair<Tree, Input> fetch(ref<Store> store, const Input & input) override + std::pair<StorePath, Input> fetch(ref<Store> store, const Input & input) override { auto tree = downloadTarball(store, getStrAttr(input.attrs, "url"), input.getName(), false).first; - return {std::move(tree), input}; + return {std::move(tree.storePath), input}; } }; |