1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Don't try to unlink the temp file more than once.

committer: mfx <mfx> 975606488 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2000-11-30 17:48:08 +00:00
parent 3cff21e90e
commit b286b2d3c2

View File

@ -227,14 +227,15 @@ void do_one_file(const char *iname, char *oname)
#if !defined(WITH_GUI)
static void unlink_ofile(const char *oname)
static void unlink_ofile(char *oname)
{
if (oname && oname[0])
{
#if defined(HAVE_CHMOD)
(void) ::chmod(oname, 0777);
#endif
(void) ::unlink(oname);
if (::unlink(oname) == 0)
oname[0] = 0;
}
}