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 is, it assumes only long filenames are being passed to it.
On 2013/02/07 08:03:39, chressie1 wrote:
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#newcode210
src/pkg/archive/tar/writer.go:210: nlen := length - i - 1
You have an excellent point. I transliterated this algorithm from gnu
tar since our test suite requires we be compatible with a real world tar
file. Here's the original source:
http://git.gag.com/?p=debian/tar;a=blob;f=src/create.c#l591

Did I make a mistake in transliterating, or do you think there's a bug
in the gnu implementation?
On 2013/02/07 08:03:39, chressie1 wrote:
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

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 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