1
0
mirror of https://github.com/golang/go synced 2024-11-24 14:10:03 -07:00

syscall: add separator for filepath if contains "." in waspi

Fix cases like "file/."
This commit is contained in:
Zxilly 2024-09-21 18:26:38 +08:00
parent 807e01db48
commit 887a08c289
No known key found for this signature in database
GPG Key ID: 47AB1DEC841BC6A2

View File

@ -409,6 +409,9 @@ func appendCleanPath(buf []byte, path string, lookupParent bool) ([]byte, bool)
case "":
continue
case ".":
if len(buf) > 0 && buf[len(buf)-1] != '/' {
buf = append(buf, '/')
}
continue
case "..":
if !lookupParent {