mirror of
https://github.com/corda/corda.git
synced 2025-06-22 17:09:00 +00:00
always create file if necessary in Java_java_io_FileOutputStream_open
Previously, we would only create the file if it did not already exist *and* we weren't appending. Now we do so whether appending or not.
This commit is contained in:
@ -624,7 +624,9 @@ Java_java_io_FileOutputStream_open(JNIEnv* e, jclass, jstring path, jboolean app
|
||||
{
|
||||
string_t chars = getChars(e, path);
|
||||
if (chars) {
|
||||
int fd = doOpen(e, chars, append ? (O_WRONLY | O_APPEND) : (O_WRONLY | O_CREAT | O_TRUNC));
|
||||
int fd = doOpen(e, chars, append
|
||||
? (O_WRONLY | O_CREAT | O_APPEND)
|
||||
: (O_WRONLY | O_CREAT | O_TRUNC));
|
||||
releaseChars(e, path, chars);
|
||||
return fd;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user