felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r891449 - /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
Date Wed, 16 Dec 2009 22:05:20 GMT
Author: gnodet
Date: Wed Dec 16 22:05:20 2009
New Revision: 891449

URL: http://svn.apache.org/viewvc?rev=891449&view=rev
Log:
FELIX-1861: FileInstall created temp directories are never deleted

Modified:
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java?rev=891449&r1=891448&r2=891449&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
Wed Dec 16 22:05:20 2009
@@ -491,6 +491,7 @@
                 if (!f.exists() && f.mkdirs())
                 {
                     tmpDir = f;
+                    tmpDir.deleteOnExit();
                     break;
                 }
             }
@@ -663,6 +664,12 @@
     {
         this.context.removeBundleListener(this);
         interrupt();
+        for (Iterator iter = currentManagedArtifacts.values().iterator(); iter.hasNext();)
+        {
+            Artifact artifact = (Artifact) iter.next();
+            deleteTransformedFile(artifact);
+            deleteJaredDirectory(artifact);
+        }
         try
         {
             join(10000);



Mime
View raw message