libbluray | branch: master | hpi1 <[email protected]> | Wed Mar  4 10:14:21 
2015 +0200| [bd90767807e4ee6669d5542768723f6e763c4dc9] | committer: hpi1

Fix persistent storage and buda write checks in Windows.

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

 src/libbluray/bdj/bdj.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c
index f016a8c..a168860 100644
--- a/src/libbluray/bdj/bdj.c
+++ b/src/libbluray/bdj/bdj.c
@@ -41,6 +41,9 @@
 #ifdef _WIN32
 #include <windows.h>
 #include <winreg.h>
+#define DIR_SEP "\\"
+#else
+#define DIR_SEP "/"
 #endif
 
 #ifdef HAVE_BDJ_J2ME
@@ -306,7 +309,7 @@ static const char *_bdj_persistent_root(BDJ_STORAGE 
*storage)
         }
 
         data_home = file_get_data_home();
-        storage->persistent_root = 
str_printf("%s/bluray/dvb.persistent.root/", data_home ? data_home : "");
+        storage->persistent_root = str_printf("%s" DIR_SEP "bluray" DIR_SEP 
"dvb.persistent.root" DIR_SEP, data_home ? data_home : "");
         X_FREE(data_home);
 
         BD_DEBUG(DBG_BDJ, "LIBBLURAY_PERSISTENT_ROOT not set, using %s\n", 
storage->persistent_root);
@@ -328,7 +331,7 @@ static const char *_bdj_buda_root(BDJ_STORAGE *storage)
         }
 
         cache_home = file_get_cache_home();
-        storage->cache_root = str_printf("%s/bluray/bluray.bindingunit.root/", 
cache_home ? cache_home : "");
+        storage->cache_root = str_printf("%s" DIR_SEP "bluray" DIR_SEP 
"bluray.bindingunit.root" DIR_SEP, cache_home ? cache_home : "");
         X_FREE(cache_home);
 
         BD_DEBUG(DBG_BDJ, "LIBBLURAY_CACHE_ROOT not set, using %s\n", 
storage->cache_root);

_______________________________________________
libbluray-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libbluray-devel

Reply via email to