1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

CanonPath, SourcePath: Change operator + to /

This is less confusing and makes it more similar to std::filesystem::path.
This commit is contained in:
Eelco Dolstra 2024-02-05 15:13:11 +01:00
parent 6ec08b85f6
commit a6737b7e17
23 changed files with 48 additions and 47 deletions

View file

@ -319,7 +319,7 @@ struct GitInputScheme : InputScheme
if (!repoInfo.isLocal)
throw Error("cannot commit '%s' to Git repository '%s' because it's not a working tree", path, input.to_string());
writeFile((CanonPath(repoInfo.url) + path).abs(), contents);
writeFile((CanonPath(repoInfo.url) / path).abs(), contents);
auto result = runProgram(RunOptions {
.program = "git",
@ -680,7 +680,7 @@ struct GitInputScheme : InputScheme
std::map<CanonPath, nix::ref<InputAccessor>> mounts;
for (auto & submodule : repoInfo.workdirInfo.submodules) {
auto submodulePath = CanonPath(repoInfo.url) + submodule.path;
auto submodulePath = CanonPath(repoInfo.url) / submodule.path;
fetchers::Attrs attrs;
attrs.insert_or_assign("type", "git");
attrs.insert_or_assign("url", submodulePath.abs());