[libbluray-devel] Fix BD-J check when install path in Windows contains non-ASCII chars
hpi1
git at videolan.org
Thu Nov 5 14:03:42 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Nov 4 14:17:34 2015 +0200| [fac02d9785f9d5cdf5df186c233aab876b7dcf48] | committer: hpi1
Fix BD-J check when install path in Windows contains non-ASCII chars
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=fac02d9785f9d5cdf5df186c233aab876b7dcf48
---
src/libbluray/bdj/bdj.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c
index 833734d..868d28f 100644
--- a/src/libbluray/bdj/bdj.c
+++ b/src/libbluray/bdj/bdj.c
@@ -26,6 +26,7 @@
#include "native/register_native.h"
+#include "file/file.h"
#include "file/dirs.h"
#include "file/dl.h"
#include "util/strutl.h"
@@ -41,9 +42,6 @@
#ifdef _WIN32
#include <windows.h>
#include <winreg.h>
-#define DIR_SEP "\\"
-#else
-#define DIR_SEP "/"
#endif
#ifdef HAVE_BDJ_J2ME
@@ -217,17 +215,17 @@ static void *_load_jvm(const char **p_java_home)
static int _can_read_file(const char *fn)
{
- FILE *fp;
+ BD_FILE_H *fp;
if (!fn) {
return 0;
}
- fp = fopen(fn, "rb");
+ fp = file_open(fn, "rb");
if (fp) {
char b;
- int result = (int)fread(&b, 1, 1, fp);
- fclose(fp);
+ int result = (int)file_read(fp, &b, 1);
+ file_close(fp);
if (result == 1) {
return 1;
}
More information about the libbluray-devel
mailing list