mirror of https://gitee.com/bigwinds/arangodb
issue #919: remove potentially existing temporary file
This commit is contained in:
parent
fc823938c0
commit
6ec4cdec53
|
@ -1053,6 +1053,9 @@ bool TRI_SaveJson (char const* filename,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove a potentially existing temporary file
|
||||||
|
TRI_UnlinkFile(tmp);
|
||||||
|
|
||||||
fd = TRI_CREATE(tmp, O_CREAT | O_TRUNC | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR);
|
fd = TRI_CREATE(tmp, O_CREAT | O_TRUNC | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR);
|
||||||
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
|
Loading…
Reference in New Issue