Added O_TRUNC flag so new format installation doesn't result in trailing garbage message

pull/290/head
Justin Berger 8 years ago
parent 68070678b5
commit 2aa26082f8

@ -2392,7 +2392,7 @@ int main(int argc, char *argv[])
perror("unable to open file to install");
}
else if ((out_fd = open(dst_path.c_str(),
O_WRONLY | O_CREAT, 0644)) == -1) {
O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1) {
fprintf(stderr, "error: unable to open destination: %s -- %s\n",
dst_path.c_str(), strerror(errno));
}

Loading…
Cancel
Save