aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/history.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/history.cpp')
-rw-r--r--src/history.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/history.cpp b/src/history.cpp
index 1bada96d..022524c3 100644
--- a/src/history.cpp
+++ b/src/history.cpp
@@ -1453,7 +1453,10 @@ bool history_t::save_internal_via_rewrite()
if (wstat(new_name, &sbuf) >= 0)
{
/* Success */
- fchown(out_fd, sbuf.st_uid, sbuf.st_gid);
+ if (0 > fchown(out_fd, sbuf.st_uid, sbuf.st_gid))
+ {
+ debug(2, L"Error when changing ownership of history file");
+ }
fchmod(out_fd, sbuf.st_mode);
}