Commit fa679847 authored by Steven Edwards's avatar Steven Edwards Committed by Alexandre Julliard

Portability fix.

parent 93bfa0d6
...@@ -242,6 +242,13 @@ int convert_to_res () ...@@ -242,6 +242,13 @@ int convert_to_res ()
fclose(fin); fclose(fin);
fclose(ftemp); fclose(ftemp);
if (unlink(g_lpstrInputFile) == -1)
{
perror("unlink");
unlink(tmpfile);
return 0;
}
if (rename(tmpfile, g_lpstrInputFile) == -1) if (rename(tmpfile, g_lpstrInputFile) == -1)
{ {
perror("rename"); perror("rename");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment