Portability fix.

This commit is contained in:
Steven Edwards 2002-06-02 21:22:50 +00:00 committed by Alexandre Julliard
parent 93bfa0d6b1
commit fa679847ed
1 changed files with 7 additions and 0 deletions

View File

@ -242,6 +242,13 @@ int convert_to_res ()
fclose(fin);
fclose(ftemp);
if (unlink(g_lpstrInputFile) == -1)
{
perror("unlink");
unlink(tmpfile);
return 0;
}
if (rename(tmpfile, g_lpstrInputFile) == -1)
{
perror("rename");