1
0
Fork 0
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:
Siddhant Kumar 2024-05-08 03:58:50 +05:30 committed by GitHub
parent 9ae6455b0e
commit fcbc36cf78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 104 additions and 82 deletions

View file

@ -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");