projects
/
platform
/
core
/
security
/
ode.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add checking return value
[platform/core/security/ode.git]
/
server
/
file-footer.cpp
diff --git
a/server/file-footer.cpp
b/server/file-footer.cpp
index
b81c14f
..
7531db4
100644
(file)
--- a/
server/file-footer.cpp
+++ b/
server/file-footer.cpp
@@
-79,7
+79,12
@@
void FileFooter::write(const std::string &key, const BinaryData &value)
runtime::File file(fileName);
- file.create(S_IRUSR | S_IWUSR);
+ if (!file.exists()) {
+ file.create(S_IRUSR | S_IWUSR);
+ } else {
+ file.open(O_RDWR);
+ }
+
file.write(value.data(), value.size());
}