diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c index 400934be1..3ce987fba 100644 --- a/gio/glocalfileoutputstream.c +++ b/gio/glocalfileoutputstream.c @@ -1194,7 +1194,8 @@ handle_overwrite_open (const char *filename, if (replace_destination_set) { g_close (fd, NULL); - + fd = -1; + if (g_unlink (filename) != 0) { errsv = errno;