1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-01 12:37:59 +02:00

Support hard links in tarballs

Fixes #10395.
This commit is contained in:
Eelco Dolstra 2024-06-11 16:05:57 +02:00
parent d1dd7abbf0
commit 35bdb9cee7
7 changed files with 78 additions and 7 deletions

View file

@ -41,6 +41,19 @@ struct FileSystemObjectSink
virtual void createSymlink(const Path & path, const std::string & target) = 0;
};
/**
* An extension of `FileSystemObjectSink` that supports file types
* that are not supported by Nix's FSO model.
*/
struct ExtendedFileSystemObjectSink : FileSystemObjectSink
{
/**
* Create a hard link. The target must be the path of a previously
* encountered file relative to the root of the FSO.
*/
virtual void createHardlink(const Path & path, const CanonPath & target) = 0;
};
/**
* Recursively copy file system objects from the source into the sink.
*/