Message ID | 1368568392-2127-16-git-send-email-mdroth@linux.vnet.ibm.com |
---|---|
State | New |
Headers | show |
diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 933c700..e439851 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -277,6 +277,9 @@ safe_open_or_create(const char *path, const char *mode, Error **err) } close(fd); + if (oflag & O_CREAT) { + unlink(path); + } } }