jdk/src/java.base/windows/native/libjava/io_util_md.c
changeset 27263 819f5f87d485
parent 27184 2996674bd701
child 34890 0e8281ef3550
equal deleted inserted replaced
27262:82895f3a728a 27263:819f5f87d485
   273 void
   273 void
   274 fileOpen(JNIEnv *env, jobject this, jstring path, jfieldID fid, int flags)
   274 fileOpen(JNIEnv *env, jobject this, jstring path, jfieldID fid, int flags)
   275 {
   275 {
   276     FD h = winFileHandleOpen(env, path, flags);
   276     FD h = winFileHandleOpen(env, path, flags);
   277     if (h >= 0) {
   277     if (h >= 0) {
       
   278         jobject fdobj;
       
   279         jboolean append;
   278         SET_FD(this, h, fid);
   280         SET_FD(this, h, fid);
       
   281 
       
   282         fdobj = (*env)->GetObjectField(env, this, fid);
       
   283         if (fdobj != NULL) {
       
   284             append = (flags & O_APPEND) == 0 ? JNI_FALSE : JNI_TRUE;
       
   285             (*env)->SetBooleanField(env, fdobj, IO_append_fdID, append);
       
   286         }
   279     }
   287     }
   280 }
   288 }
   281 
   289 
   282 /* These are functions that use a handle fd instead of the
   290 /* These are functions that use a handle fd instead of the
   283    old C style int fd as is used in HPI layer */
   291    old C style int fd as is used in HPI layer */