Support for hardlinks to symlinks

This is a specialized use-case, but it is indeed possible to do this
and can be used if xattrs are attached to the symlink.
This commit is contained in:
2023-10-03 23:46:00 -05:00
committed by John K. Luebs
parent 5b40bf3d93
commit a1a3f3d4cb
5 changed files with 165 additions and 40 deletions

View File

@@ -125,6 +125,10 @@ func (entry *Entry) RestoreSpecial(fullPath string) error {
return nil
}
func MakeHardlink(source string, target string) error {
return os.Link(source, target)
}
func joinPath(components ...string) string {
combinedPath := `\\?\` + filepath.Join(components...)