aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/history.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/history.cc b/src/history.cc
index 5ba33ea..5394835 100644
--- a/src/history.cc
+++ b/src/history.cc
@@ -70,7 +70,7 @@ void save_history(const string &path)
* So we just write to a temp file, and rename it to replace the "real" history file
*/
string tmp_path = path + ".tmp";
- int fd = open(tmp_path.c_str(), (O_WRONLY | O_CREAT | O_TRUNC), (S_IRUSR | S_IWUSR));
+ int fd = open(tmp_path.c_str(), (O_WRONLY | O_CREAT | O_TRUNC | O_NOFOLLOW), (S_IRUSR | S_IWUSR));
if (fd == -1)
{
loggerln("save_history: fail to open() history");