You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2004/02/29 23:47:21 UTC

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java

remm        2004/02/29 14:47:21

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardHostDeployer.java
  Log:
  - Reuse already existing util code.
  
  Revision  Changes    Path
  1.21      +3 -27     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java
  
  Index: StandardHostDeployer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- StandardHostDeployer.java	27 Feb 2004 14:58:42 -0000	1.20
  +++ StandardHostDeployer.java	29 Feb 2004 22:47:21 -0000	1.21
  @@ -649,7 +649,7 @@
                               long contextLastModified = 
                                   contextFile.lastModified();
                               if (contextFile.isDirectory()) {
  -                                deleteDir(contextFile);
  +                                ExpandWar.deleteDir(contextFile);
                               }
                               if (host.isUnpackWARs()) {
                                   File contextWAR = 
  @@ -678,7 +678,7 @@
                       workDir = new File(((StandardContext)context).getWorkPath());
                   }
                   if (workDir != null && workDir.exists()) {
  -                    deleteDir(workDir);
  +                    ExpandWar.deleteDir(workDir);
                   }
               }
   
  @@ -828,29 +828,5 @@
   
       }
   
  -
  -    /**
  -     * Delete the specified directory, including all of its contents and
  -     * subdirectories recursively.
  -     *
  -     * @param dir File object representing the directory to be deleted
  -     */
  -    protected void deleteDir(File dir) {
  -
  -        String files[] = dir.list();
  -        if (files == null) {
  -            files = new String[0];
  -        }
  -        for (int i = 0; i < files.length; i++) {
  -            File file = new File(dir, files[i]);
  -            if (file.isDirectory()) {
  -                deleteDir(file);
  -            } else {
  -                file.delete();
  -            }
  -        }
  -        dir.delete();
  -
  -    }
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org