mirror of
https://github.com/NixOS/nix.git
synced 2025-12-10 11:01:03 +01:00
Devirtualize double-copied paths
Borrowed from the original lazy-trees branch.
This commit is contained in:
parent
e099a5bc67
commit
0c0dda3b29
4 changed files with 33 additions and 2 deletions
|
|
@ -2317,6 +2317,9 @@ BackedStringView EvalState::coerceToString(
|
|||
}
|
||||
|
||||
if (v.type() == nPath) {
|
||||
// FIXME: instead of copying the path to the store, we could
|
||||
// return a virtual store path that lazily copies the path to
|
||||
// the store in devirtualize().
|
||||
return
|
||||
!canonicalizePath && !copyToStore
|
||||
? // FIXME: hack to preserve path literals that end in a
|
||||
|
|
@ -2406,7 +2409,7 @@ StorePath EvalState::copyPathToStore(NixStringContext & context, const SourcePat
|
|||
*store,
|
||||
path.resolveSymlinks(SymlinkResolution::Ancestors),
|
||||
settings.readOnlyMode ? FetchMode::DryRun : FetchMode::Copy,
|
||||
path.baseName(),
|
||||
computeBaseName(path),
|
||||
ContentAddressMethod::Raw::NixArchive,
|
||||
nullptr,
|
||||
repair);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue