mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-10-27 13:40:00 -04:00
Handle long paths correctly in reparse points
This commit is contained in:
1 parent
93ca0b892a
commit
6606cf93e2
1 file changed
+1
-1
+1
-1
@@ -80,7 +80,7 @@ func EncodeReparsePoint(rp *ReparsePoint) []byte {
|
||||
var ntTarget string
|
||||
relative := false
|
||||
if strings.HasPrefix(rp.Target, `\\?\`) {
|
||||
ntTarget = rp.Target
|
||||
ntTarget = `\??\` + rp.Target[4:]
|
||||
} else if strings.HasPrefix(rp.Target, `\\`) {
|
||||
ntTarget = `\??\UNC\` + rp.Target[2:]
|
||||
} else if len(rp.Target) >= 2 && isDriveLetter(rp.Target[0]) && rp.Target[1] == ':' {
|
||||
|
||||
Reference in new issue
Block a user