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/main/org/apache/tools/ant/taskdefs/archive Tar.java
Date Sun, 27 Jan 2002 21:45:45 GMT
donaldp     02/01/27 13:45:45

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/archive
                        Tar.java
  Log:
  Don't modify parameters
  
  Revision  Changes    Path
  1.2       +10 -9     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/archive/Tar.java
  
  Index: Tar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/archive/Tar.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Tar.java	27 Jan 2002 10:07:15 -0000	1.1
  +++ Tar.java	27 Jan 2002 21:45:45 -0000	1.2
  @@ -232,32 +232,33 @@
   
       private void tarFile( final File file,
                             final TarOutputStream output,
  -                          String path,
  +                          final String path,
                             final TarFileSet tarFileSet )
           throws IOException, TaskException
       {
  +        String storedPath = path;
           // don't add "" to the archive
  -        if( path.length() <= 0 )
  +        if( storedPath.length() <= 0 )
           {
               return;
           }
   
  -        if( file.isDirectory() && !path.endsWith( "/" ) )
  +        if( file.isDirectory() && !storedPath.endsWith( "/" ) )
           {
  -            path += "/";
  +            storedPath += "/";
           }
   
  -        if( path.length() >= TarEntry.NAMELEN )
  +        if( storedPath.length() >= TarEntry.NAMELEN )
           {
               if( longFileMode.isOmitMode() )
               {
  -                final String message = "Omitting: " + path;
  +                final String message = "Omitting: " + storedPath;
                   getLogger().info( message );
                   return;
               }
               else if( longFileMode.isWarnMode() )
               {
  -                final String message = "Entry: " + path + " longer than " +
  +                final String message = "Entry: " + storedPath + " longer than " +
                       TarEntry.NAMELEN + " characters.";
                   getLogger().warn( message );
                   if( !longWarningGiven )
  @@ -270,7 +271,7 @@
               }
               else if( longFileMode.isFailMode() )
               {
  -                final String message = "Entry: " + path + " longer than " +
  +                final String message = "Entry: " + storedPath + " longer than " +
                       TarEntry.NAMELEN + "characters.";
                   throw new TaskException( message );
               }
  @@ -279,7 +280,7 @@
           FileInputStream input = null;
           try
           {
  -            final TarEntry entry = new TarEntry( path );
  +            final TarEntry entry = new TarEntry( storedPath );
               entry.setModTime( file.lastModified() );
               if( !file.isDirectory() )
               {
  
  
  

--
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