User: starksm 
  Date: 01/09/06 11:48:28

  Modified:    src/main/org/jboss/deployment Installer.java
  Log:
  Preserve the last modified time of jar entries if the time exists
  
  Revision  Changes    Path
  1.13      +8 -3      jboss/src/main/org/jboss/deployment/Installer.java
  
  Index: Installer.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/deployment/Installer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Installer.java    2001/08/29 22:53:00     1.12
  +++ Installer.java    2001/09/06 18:48:28     1.13
  @@ -57,7 +57,7 @@
    *
    *   @see <related>
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Schulze</a>
  - *   @version $Revision: 1.12 $
  + *   @version $Revision: 1.13 $
    */
   public class Installer
   {
  @@ -606,13 +606,18 @@
               int x = name.lastIndexOf("/");
               if (x != -1)
               {
  -               File dir = new File(_destDir.getCanonicalPath() + File.separator + 
name.substring(0, x));
  +               File dir = new File(_destDir, name.substring(0, x));
                  if (!dir.exists())
                     dir.mkdirs();
               }
               // and extract...
  -            out = new FileOutputStream(_destDir.getCanonicalPath() + File.separator 
+ name);
  +            File file = new File(_destDir, name);
  +            out = new FileOutputStream(file);
               copy(_in, out, false);
  +            // Preserve the last modified time if it exists
  +            long time = entry.getTime();
  +            if( time > 0 )
  +               file.setLastModified(time);
            }
         }
         _in.close();
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to