mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
pass O_TRUNC to open in FileOutputStream.open
This commit is contained in:
parent
9bea21dec7
commit
9388b6e2ce
@ -257,7 +257,7 @@ Java_java_io_FileOutputStream_open(JNIEnv* e, jclass, jstring path)
|
||||
{
|
||||
const char* chars = e->GetStringUTFChars(path, 0);
|
||||
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);
|
||||
return fd;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user