mirror of
https://github.com/NixOS/nix
synced 2025-07-04 15:31:47 +02:00
Use std::filesystem::path
in more places (#10657)
Progress on #9205 Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems> * Get rid of `PathNG`, just use `std::filesystem::path`
This commit is contained in:
parent
9ae6455b0e
commit
fcbc36cf78
13 changed files with 104 additions and 82 deletions
|
@ -31,11 +31,11 @@ void SSHMaster::addCommonSSHOpts(Strings & args)
|
|||
if (!keyFile.empty())
|
||||
args.insert(args.end(), {"-i", keyFile});
|
||||
if (!sshPublicHostKey.empty()) {
|
||||
Path fileName = (Path) *state->tmpDir + "/host-key";
|
||||
std::filesystem::path fileName = state->tmpDir->path() / "host-key";
|
||||
auto p = host.rfind("@");
|
||||
std::string thost = p != std::string::npos ? std::string(host, p + 1) : host;
|
||||
writeFile(fileName, thost + " " + base64Decode(sshPublicHostKey) + "\n");
|
||||
args.insert(args.end(), {"-oUserKnownHostsFile=" + fileName});
|
||||
writeFile(fileName.string(), thost + " " + base64Decode(sshPublicHostKey) + "\n");
|
||||
args.insert(args.end(), {"-oUserKnownHostsFile=" + fileName.string()});
|
||||
}
|
||||
if (compress)
|
||||
args.push_back("-C");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue