[libbluray-devel] Log persistent storage creation failure

hpi1 git at videolan.org
Mon Apr 3 14:31:14 CEST 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Apr  3 12:08:07 2017 +0300| [6dffb7e606bed7e2d85e50625db7ee83e2ef668f] | committer: hpi1

Log persistent storage creation failure

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=6dffb7e606bed7e2d85e50625db7ee83e2ef668f
---

 src/libbluray/bdj/java/org/videolan/BDJAppProxy.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java b/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
index 7130d28..ae117af 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
@@ -212,7 +212,10 @@ class BDJAppProxy implements DVBJProxy, Runnable {
                 String persistent = System.getProperty("dvb.persistent.root") + File.separator +
                     (String)context.getXletProperty("dvb.org.id") + File.separator +
                     (String)context.getXletProperty("dvb.app.id");
-                new File(persistent).mkdirs();
+                File f = new File(persistent);
+                if (!f.exists() && !f.mkdirs()) {
+                    logger.error("Error creating persistent storage " + persistent);
+                }
                 xlet.initXlet(context);
                 state = PAUSED;
                 return true;



More information about the libbluray-devel mailing list