forked from lix-project/lix
11ba4302e3
Probably as a result of a bad merge in
4b8f1b0ec0
, we had both a
BinaryCacheStoreAccessor and a
RemoteFSAccessor. BinaryCacheStore::getFSAccessor() returned the
latter, but BinaryCacheStore::addToStore() checked for the
former. This probably caused hydra-queue-runner to download paths that
it just uploaded.
33 lines
579 B
C++
33 lines
579 B
C++
#pragma once
|
|
|
|
#include "fs-accessor.hh"
|
|
#include "ref.hh"
|
|
#include "store-api.hh"
|
|
|
|
namespace nix {
|
|
|
|
class RemoteFSAccessor : public FSAccessor
|
|
{
|
|
ref<Store> store;
|
|
|
|
std::map<Path, ref<FSAccessor>> nars;
|
|
|
|
std::pair<ref<FSAccessor>, Path> fetch(const Path & path_);
|
|
|
|
friend class BinaryCacheStore;
|
|
|
|
public:
|
|
|
|
RemoteFSAccessor(ref<Store> store);
|
|
|
|
Stat stat(const Path & path) override;
|
|
|
|
StringSet readDirectory(const Path & path) override;
|
|
|
|
std::string readFile(const Path & path) override;
|
|
|
|
std::string readLink(const Path & path) override;
|
|
};
|
|
|
|
}
|