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
parent 52e628ac93
commit 4934df4e08
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...)