aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/legacy-ssh-store.cc
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-09-11 11:11:05 +0200
committerregnat <rg@regnat.ovh>2020-09-16 13:53:09 +0200
commit7f103dcddd4cf3c0748b7a379a117f3262c4c5f7 (patch)
tree7288d4b6552bb45be7c0dfa1e985340769e2f114 /src/libstore/legacy-ssh-store.cc
parent5895184df44e86ae55270390402c8263b0f24ae2 (diff)
Properly filter the stores according to their declared uriSchemes
When opening a store, only try the stores whose `uriSchemes()` include the current one
Diffstat (limited to 'src/libstore/legacy-ssh-store.cc')
-rw-r--r--src/libstore/legacy-ssh-store.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc
index bbab452ab..6dc83e288 100644
--- a/src/libstore/legacy-ssh-store.cc
+++ b/src/libstore/legacy-ssh-store.cc
@@ -41,9 +41,9 @@ struct LegacySSHStore : public Store, public virtual LegacySSHStoreConfig
SSHMaster master;
- static std::vector<std::string> uriPrefixes() { return {"ssh"}; }
+ static std::set<std::string> uriSchemes() { return {"ssh"}; }
- LegacySSHStore(const string & host, const Params & params)
+ LegacySSHStore(const string & scheme, const string & host, const Params & params)
: StoreConfig(params)
, LegacySSHStoreConfig(params)
, Store(params)
@@ -92,7 +92,7 @@ struct LegacySSHStore : public Store, public virtual LegacySSHStoreConfig
string getUri() override
{
- return uriPrefixes()[0] + "://" + host;
+ return *uriSchemes().begin() + "://" + host;
}
void queryPathInfoUncached(const StorePath & path,