Portability fix.
This commit is contained in:
parent
93bfa0d6b1
commit
fa679847ed
|
@ -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");
|
||||||
|
|
Loading…
Reference in New Issue