1
0
Fork 0

issue #919: remove potentially existing temporary file

This commit is contained in:
Jan Steemann 2014-06-21 14:32:59 +02:00
parent fc823938c0
commit 6ec4cdec53
1 changed files with 3 additions and 0 deletions

View File

@ -1053,6 +1053,9 @@ bool TRI_SaveJson (char const* filename,
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);
if (fd < 0) {