mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-10-27 05:29:58 -04:00
Backuptar: replace slash with backslash on link target
This commit is contained in:
1 parent
9f57cbbcbc
commit
93ca0b892a
1 file changed
+1
-1
+1
-1
@@ -284,7 +284,7 @@ func WriteBackupStreamFromTarFile(w io.Writer, t *tar.Reader, hdr *tar.Header) (
|
|||||||
if hdr.Typeflag == tar.TypeSymlink {
|
if hdr.Typeflag == tar.TypeSymlink {
|
||||||
_, isMountPoint := hdr.Winheaders[hdrMountPoint]
|
_, isMountPoint := hdr.Winheaders[hdrMountPoint]
|
||||||
rp := winio.ReparsePoint{
|
rp := winio.ReparsePoint{
|
||||||
Target: hdr.Linkname,
|
Target: filepath.FromSlash(hdr.Linkname),
|
||||||
IsMountPoint: isMountPoint,
|
IsMountPoint: isMountPoint,
|
||||||
}
|
}
|
||||||
reparse := winio.EncodeReparsePoint(&rp)
|
reparse := winio.EncodeReparsePoint(&rp)
|
||||||
|
|||||||
Reference in new issue
Block a user