CID 22580 Time of check time of use

no need to check this first
This commit is contained in:
Enno Rehling 2015-11-05 13:22:51 +01:00
parent 797eee025d
commit 8a057f183f
1 changed files with 2 additions and 4 deletions

View File

@ -1743,10 +1743,8 @@ int writegame(const char *filename)
sprintf(path, "%s/%s", datapath(), filename);
#ifdef HAVE_UNISTD_H
if (access(path, R_OK) == 0) {
/* make sure we don't overwrite some hardlinkedfile */
unlink(path);
}
/* make sure we don't overwrite an existing file (hard links) */
unlink(path);
#endif
F = fopen(path, "wb");
if (!F) {