Skip to content

Commit a93231c

Browse files
committed
Add a comment about path.Clean
Signed-off-by: Matt Moore <[email protected]>
1 parent ddc38bd commit a93231c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

estargz/estargz.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@ func formatModtime(t time.Time) string {
819819
}
820820

821821
func cleanEntryName(name string) string {
822+
// Use path.Clean to consistently deal with path separators across platforms.
822823
return strings.TrimPrefix(path.Clean("/"+name), "/")
823824
}
824825

0 commit comments

Comments
 (0)