PATCH - bin2res Make sure input rc file is removed before creating new one

Steven Edwards Steven_Ed4153 at yahoo.com
Sat Jun 1 21:00:21 CDT 2002


License LGPL as I just looked at the line below it to figure out how to
remove the file.

Changelog: Portablity Fix for stupid platforms

Thanks
Steven

"Every revolution was once a thought in one man's mind"
- Ralph Waldo Emerson 

cvs diff -u bin2res.c 
Index: bin2res.c
===================================================================
RCS file: /home/wine/wine/tools/bin2res.c,v
retrieving revision 1.12
diff -u -r1.12 bin2res.c
--- bin2res.c	31 May 2002 23:41:00 -0000	1.12
+++ bin2res.c	2 Jun 2002 01:56:54 -0000
@@ -242,6 +242,12 @@
 
         fclose(fin);
 	fclose(ftemp);
+
+	if (remove(g_lpstrInputFile) == -1)
+	{
+            perror("remove");
+            return 0;
+	}
 	if (rename(tmpfile, g_lpstrInputFile) == -1)
         {
             perror("rename");




More information about the wine-patches mailing list