--- gqview-2.1.5/src/ui_fileops.c.bak 2006-11-18 00:55:32.000000000 +0200 +++ gqview-2.1.5/src/ui_fileops.c 2007-08-14 19:52:14.889449152 +0300 @@ -437,7 +437,13 @@ gint copy_file(const gchar *s, const gch } fclose(fi); - fclose(fo); + if (fflush(fo) == EOF) { + fclose(fo); + return FALSE; + } + if (fclose(fo) == EOF) { + return FALSE; + } copy_file_attributes(s, t, TRUE, TRUE);