commit | fa30d45380146ea9c1bf748c544c4b416045b2f4 | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Wed Dec 16 22:05:20 2009 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Wed Dec 16 22:05:20 2009 +0000 |
tree | ec3e1695df80d2a74020545a8bde653a3ef2ae95 | |
parent | 3e1998cf52f39066af627b6516d206785ecf61c7 [diff] |
FELIX-1861: FileInstall created temp directories are never deleted git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@891449 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java index 52ce8fe..ffce643 100644 --- a/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java +++ b/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
@@ -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);