Skip to content

Commit 887a08c

Browse files
committed
syscall: add separator for filepath if contains "." in waspi
Fix cases like "file/."
1 parent 807e01d commit 887a08c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/syscall/fs_wasip1.go

+3
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@ func appendCleanPath(buf []byte, path string, lookupParent bool) ([]byte, bool)
409409
case "":
410410
continue
411411
case ".":
412+
if len(buf) > 0 && buf[len(buf)-1] != '/' {
413+
buf = append(buf, '/')
414+
}
412415
continue
413416
case "..":
414417
if !lookupParent {

0 commit comments

Comments
 (0)