schwer-q / xar

Automatically exported from code.google.com/p/xar
0 stars 0 forks source link

Bogus subdoc name causes malformed toc #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Creating a xar archive with a bogus/missing filename for the -s option will 
generate a toc that 
looks malformed: the subdoc element encloses all other content.

For example:

% touch fff
% xar -cf foo.xar fff -s xxx
% xar -f foo.xar --dump-toc=/dev/stdout
<?xml version="1.0" encoding="UTF-8"?>
<xar>
 <subdoc subdoc_name="subdoc">
  <toc>
   <file id="1">
    <name>fff</name>
    <type>file</type>
    <mode>0664</mode>
    <uid>501</uid>
    <user>jberry</user>
    <gid>501</gid>
    <group>jberry</group>
    <atime>2007-04-24T17:11:50Z</atime>
    <mtime>2007-04-24T17:11:50Z</mtime>
    <ctime>2007-04-24T17:11:50Z</ctime>
   </file>
   <checksum style="sha1">
    <size>20</size>
    <offset>0</offset>
   </checksum>
  </toc>
 </subdoc>
 <toc/>
</xar>

Original issue reported on code.google.com by ja...@jberry.us on 24 Apr 2007 at 5:15

GoogleCodeExporter commented 9 years ago
This should be resolved with commit r133.

Original comment by bbraun on 24 Apr 2007 at 6:06