mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
Fix for windows ::open
This commit is contained in:
parent
9e4144f92b
commit
f2d2c9af29
@ -802,7 +802,11 @@ Java_java_io_RandomAccessFile_open(JNIEnv* e, jclass, jstring path,
|
|||||||
jlong peer = 0;
|
jlong peer = 0;
|
||||||
jlong length = 0;
|
jlong length = 0;
|
||||||
#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||||
|
#if defined(PLATFORM_WINDOWS)
|
||||||
|
int fd = ::_wopen(chars, O_RDONLY);
|
||||||
|
#else
|
||||||
int fd = ::open((const char*)chars, O_RDONLY);
|
int fd = ::open((const char*)chars, O_RDONLY);
|
||||||
|
#endif
|
||||||
releaseChars(e, path, chars);
|
releaseChars(e, path, chars);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
throwNewErrno(e, "java/io/IOException");
|
throwNewErrno(e, "java/io/IOException");
|
||||||
|
Loading…
Reference in New Issue
Block a user