ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/tar TarInputStream.java
Date Fri, 01 Mar 2002 08:52:43 GMT
donaldp     02/03/01 00:52:43

  Modified:    proposal/myrmidon/src/java/org/apache/aut/tar
                        TarInputStream.java
  Log:
  Allow v7 format tar files
  
  (Patch copied from main source tree)
  
  Revision  Changes    Path
  1.4       +2 -21     jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/tar/TarInputStream.java
  
  Index: TarInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/aut/tar/TarInputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TarInputStream.java	28 Jan 2002 09:24:26 -0000	1.3
  +++ TarInputStream.java	1 Mar 2002 08:52:43 -0000	1.4
  @@ -32,6 +32,7 @@
       private boolean m_hasHitEOF;
       private byte[] m_oneBuf;
       private byte[] m_readBuf;
  +    private boolean m_v7Format;
   
       public TarInputStream( final InputStream input )
       {
  @@ -133,27 +134,7 @@
                   headerBuf[ 259 ] == 't' && headerBuf[ 260 ] == 'a' &&
                   headerBuf[ 261 ] == 'r' ) )
               {
  -                m_entrySize = 0;
  -                m_entryOffset = 0;
  -                m_currEntry = null;
  -
  -                final String message = "bad header in block " +
  -                    m_buffer.getCurrentBlockNum() +
  -                    " record " + m_buffer.getCurrentRecordNum() + ", " +
  -                    "header magic is not 'ustar', but '" +
  -                    headerBuf[ 257 ] +
  -                    headerBuf[ 258 ] +
  -                    headerBuf[ 259 ] +
  -                    headerBuf[ 260 ] +
  -                    headerBuf[ 261 ] +
  -                    "', or (dec) " +
  -                    ( (int)headerBuf[ 257 ] ) + ", " +
  -                    ( (int)headerBuf[ 258 ] ) + ", " +
  -                    ( (int)headerBuf[ 259 ] ) + ", " +
  -                    ( (int)headerBuf[ 260 ] ) + ", " +
  -                    ( (int)headerBuf[ 261 ] );
  -
  -                throw new IOException( message );
  +                m_v7Format = true;
               }
   
               if( m_debug )
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message