[libbluray-devel] Fix persistent storage and buda write checks in Windows.
hpi1
git at videolan.org
Wed Mar 4 10:30:19 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | 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);
More information about the libbluray-devel
mailing list