[libbluray-devel] BDJAppProxy: remove (empty) persistent storage directory after Xlet has been terminated
hpi1
git at videolan.org
Fri Feb 27 11:54:25 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Feb 27 11:40:09 2015 +0200| [03686dc11ae3a9325cdc0b82f0daf157a0f73e9e] | committer: hpi1
BDJAppProxy: remove (empty) persistent storage directory after Xlet has been terminated
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=03686dc11ae3a9325cdc0b82f0daf157a0f73e9e
---
src/libbluray/bdj/java/org/videolan/BDJAppProxy.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java b/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
index e938165..89bdf03 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
@@ -145,7 +145,15 @@ public class BDJAppProxy implements DVBJProxy, Runnable {
logger.error("release(): STOP timeout, killing Xlet " + context.getThreadGroup().getName());
}
+ final String persistentOrg = System.getProperty("dvb.persistent.root") + File.separator +
+ (String)context.getXletProperty("dvb.org.id") + File.separator;
+ final String persistentApp = persistentOrg + (String)context.getXletProperty("dvb.app.id");
+
context.release();
+
+ if (new File(persistentApp).delete()) {
+ new File(persistentOrg).delete();
+ }
}
public void addAppStateChangeEventListener(AppStateChangeEventListener listener) {
@@ -239,14 +247,6 @@ public class BDJAppProxy implements DVBJProxy, Runnable {
context.closeSockets();
context.getThreadGroup().waitForShutdown(1000, 1 + context.numEventQueueThreads());
- String persistent = System.getProperty("dvb.persistent.root") + File.separator +
- (String)context.getXletProperty("dvb.org.id") + File.separator +
- (String)context.getXletProperty("dvb.app.id");
- if (new File(persistent).delete()) {
- persistent = System.getProperty("dvb.persistent.root") + File.separator +
- (String)context.getXletProperty("dvb.org.id");
- new File(persistent).delete();
- }
} catch (Throwable e) {
logger.error("doStop() failed: " + e + "\n" + Logger.dumpStack(e));
state = INVALID;
More information about the libbluray-devel
mailing list