mirror of
https://github.com/corda/corda.git
synced 2025-06-20 16:10:26 +00:00
pass O_TRUNC to open in FileOutputStream.open
This commit is contained in:
@ -257,7 +257,7 @@ Java_java_io_FileOutputStream_open(JNIEnv* e, jclass, jstring path)
|
|||||||
{
|
{
|
||||||
const char* chars = e->GetStringUTFChars(path, 0);
|
const char* chars = e->GetStringUTFChars(path, 0);
|
||||||
if (chars) {
|
if (chars) {
|
||||||
int fd = doOpen(e, chars, O_WRONLY | O_CREAT);
|
int fd = doOpen(e, chars, O_WRONLY | O_CREAT | O_TRUNC);
|
||||||
e->ReleaseStringUTFChars(path, chars);
|
e->ReleaseStringUTFChars(path, chars);
|
||||||
return fd;
|
return fd;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user