mirror of
https://github.com/NixOS/nix.git
synced 2025-12-17 22:41:08 +01:00
getUri should be const and on Store::Config not Store
It is a side-effect property of the configuration alone, not the rest of the store.
This commit is contained in:
parent
f93d25c0e7
commit
0ef6f72c9c
33 changed files with 123 additions and 122 deletions
|
|
@ -54,15 +54,14 @@ UDSRemoteStore::UDSRemoteStore(ref<const Config> config)
|
|||
{
|
||||
}
|
||||
|
||||
std::string UDSRemoteStore::getUri()
|
||||
std::string UDSRemoteStoreConfig::getUri() const
|
||||
{
|
||||
return config->path == settings.nixDaemonSocketFile
|
||||
? // FIXME: Not clear why we return daemon here and not default
|
||||
// to settings.nixDaemonSocketFile
|
||||
//
|
||||
// unix:// with no path also works. Change what we return?
|
||||
return path == settings.nixDaemonSocketFile ? // FIXME: Not clear why we return daemon here and not default
|
||||
// to settings.nixDaemonSocketFile
|
||||
//
|
||||
// unix:// with no path also works. Change what we return?
|
||||
"daemon"
|
||||
: std::string(*Config::uriSchemes().begin()) + "://" + config->path;
|
||||
: std::string(*uriSchemes().begin()) + "://" + path;
|
||||
}
|
||||
|
||||
void UDSRemoteStore::Connection::closeWrite()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue