git://developer.intra2net.com
/
libi2ncommon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
change permissions before fsync()
[libi2ncommon]
/
src
/
oftmpstream.cpp
diff --git
a/src/oftmpstream.cpp
b/src/oftmpstream.cpp
index
bf4dda9
..
71fadd4
100644
(file)
--- a/
src/oftmpstream.cpp
+++ b/
src/oftmpstream.cpp
@@
-121,8
+121,8
@@
void oftmpstream::close()
if (!is_open)
return;
- fsync(fd);
fchmod (fd, file_mode); // fix/change mkstemp permissions
+ fsync(fd);
::close (fd);
if (rename (tmpname.c_str(), realname.c_str()) != 0)