FAQ
https://codereview.appspot.com/6700047/diff/71008/src/pkg/archive/tar/writer.go
File src/pkg/archive/tar/writer.go (right):

https://codereview.appspot.com/6700047/diff/71008/src/pkg/archive/tar/writer.go#newcode202
src/pkg/archive/tar/writer.go:202: func (tw *Writer)
splitUSTARLongName(name string) (prefix, suffix string, err error) {
it looks like the method is splitting also the file names < 100 chars..

if length <= 100 {
return "", name, nil
}

https://codereview.appspot.com/6700047/diff/71008/src/pkg/archive/tar/writer.go#newcode207
src/pkg/archive/tar/writer.go:207: length--
shouldn't this be length++ ? (explanation below)

https://codereview.appspot.com/6700047/diff/71008/src/pkg/archive/tar/writer.go#newcode210
src/pkg/archive/tar/writer.go:210: nlen := length - i - 1
if name ends with a slash and the length of name is <=
fileNamePrefixSize, nlen will be -2.

https://codereview.appspot.com/6700047/

--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedFeb 7, '13 at 8:03a
activeFeb 8, '13 at 10:14a
posts5
users2
websitegolang.org

2 users in discussion

Shanemhansen: 3 posts Chressie: 2 posts

People

Translate

site design / logo © 2022 Grokbase