diff --git a/libutil/util_autocomp_host.c b/libutil/util_autocomp_host.c index df3493bf..f501bf3b 100644 --- a/libutil/util_autocomp_host.c +++ b/libutil/util_autocomp_host.c @@ -64,7 +64,7 @@ static int init_scriptfile(char *file_path) { int fd; - fd = open(file_path, O_CREAT | O_WRONLY, 0644); + fd = open(file_path, O_CREAT | O_WRONLY | O_TRUNC, 0644); if (fd < 0) return -EIO; return fd;