aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--NEWS1
-rw-r--r--netx/net/sourceforge/jnlp/cache/CacheUtil.java10
3 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c083cc8..34926c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-26 Andrew Su <[email protected]>
+
+ * NEWS: Update.
+ * netx/net/sourceforge/jnlp/cache/CacheUtil.java:
+ (cleanCache): Split conditional for delete.
+
2011-05-20 Andrew Su <[email protected]>
* NEWS: Update.
diff --git a/NEWS b/NEWS
index 9734ef0..c105686 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,7 @@ New in release 1.1 (2011-XX-XX):
- RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled)
- PR658: now jnlp.packEnabled works with applets.
- PR726: closing javaws -about no longer throws exceptions.
+ - PR727: cache now properly removes files.
* Plugin
- PR475, RH604061: Allow applets from the same page to use the same classloader
- PR612: NetDania application ends on java.security.AccessControlException: access denied (java.util.PropertyPermission browser read)
diff --git a/netx/net/sourceforge/jnlp/cache/CacheUtil.java b/netx/net/sourceforge/jnlp/cache/CacheUtil.java
index a307a11..b88c6e9 100644
--- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java
+++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java
@@ -567,6 +567,11 @@ public class CacheUtil {
rStr = cacheDir + rStr.substring(0, rStr.indexOf(File.separatorChar, 1));
long len = file.length();
+ if (keep.contains(file.getPath().substring(rStr.length()))) {
+ lruHandler.removeEntry(key);
+ continue;
+ }
+
/*
* we remove entries from our lru if any of the following condition is met.
* Conditions:
@@ -574,11 +579,8 @@ public class CacheUtil {
* - !file.isFile(): if someone tampered with the directory, file doesn't exist.
* - maxSize >= 0 && curSize + len > maxSize: If a limit was set and the new size
* on disk would exceed the maximum size.
- * - keep.contains(...): We had already decided to keep an entry with the same
- * url path.
*/
- if (delete || !file.isFile() || (maxSize >= 0 && curSize + len > maxSize) ||
- keep.contains(file.getPath().substring(rStr.length()))) {
+ if (delete || !file.isFile() || (maxSize >= 0 && curSize + len > maxSize)) {
lruHandler.removeEntry(key);
remove.add(rStr);
} else {