Index: modules/tar/tar.man ================================================================== --- modules/tar/tar.man +++ modules/tar/tar.man @@ -1,7 +1,7 @@ [comment {-*- mode: tcl ; fill-column: 80 -*- doctools manpage}] -[vset PACKAGE_VERSION 0.13] +[vset PACKAGE_VERSION 0.14] [manpage_begin tar n [vset PACKAGE_VERSION]] [keywords archive] [keywords {tape archive}] [keywords tar] [moddesc {Tar file handling}] Index: modules/tar/tar.tcl ================================================================== --- modules/tar/tar.tcl +++ modules/tar/tar.tcl @@ -10,11 +10,11 @@ # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. package require Tcl 8.5 9 -package provide tar 0.13 +package provide tar 0.14 # # ## ### ##### ######## ############# ##################### ## # Gzip support # @@ -136,11 +136,11 @@ foreach x {name type linkname} { set $x [string trim [set $x] "\x00"] } foreach x {uid gid size mtime cksum} { - set $x [format %d 0[string trim [set $x] " \x00"]] + set $x [format %d 0o0[string trim [set $x] " \x00"]] } set mode [string trim $mode " \x00"] if {$magic eq "ustar "} { # gnu tar @@ -147,19 +147,19 @@ # not fully supported foreach x {uname gname prefix} { set $x [string trim [set $x] "\x00"] } foreach x {devmajor devminor} { - set $x [format %d 0[string trim [set $x] " \x00"]] + set $x [format %d 0o0[string trim [set $x] " \x00"]] } } elseif {$magic eq "ustar\x00"} { # posix tar foreach x {uname gname prefix} { set $x [string trim [set $x] "\x00"] } foreach x {devmajor devminor} { - set $x [format %d 0[string trim [set $x] " \x00"]] + set $x [format %d 0o0[string trim [set $x] " \x00"]] } } else { # old style tar foreach x {uname gname devmajor devminor prefix} { set $x {} } if {$type eq ""} { Index: modules/tar/tar.test ================================================================== --- modules/tar/tar.test +++ modules/tar/tar.test @@ -124,16 +124,28 @@ } -cleanup { cleanup-tkt-9f4c0e3e95 unset tarfile } -result {zero-two} -test tar-tkt-9f4c0e3e95-1.1 {Ticket 9f4c0e3e95, B, } -setup { +test tar-tkt-9f4c0e3e95-1.1 {Ticket 9f4c0e3e95, B} -setup { set tarfile [setup-tkt-9f4c0e3e95] } -body { tar::get $tarfile 0b10 } -cleanup { cleanup-tkt-9f4c0e3e95 unset tarfile } -returnCodes error -result {Tar "tartest/t.tar": File "0b10" not found} + +# ------------------------------------------------------------------------- + +test tar-tkt-b01462dff7-1.0 {Ticket b01462dff7} -setup { + set tarfile [localPath tests/b01462dff7.tar] +} -body { + tar::untar $tarfile ; set _ "" ;# squash and ignore untar result +} -cleanup { + # remove the extracted files + file delete cp.html fields.c grammar.lsp sum xargs.1 + unset tarfile _ +} -result {} # ------------------------------------------------------------------------- testsuiteCleanup ADDED modules/tar/tests/b01462dff7.tar Index: modules/tar/tests/b01462dff7.tar ================================================================== --- /dev/null +++ modules/tar/tests/b01462dff7.tar cannot compute difference between binary files