mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 21:51:09 +00:00
Don't fclose(NULL) if a file doesn't exist.
This commit is contained in:
parent
f518f75149
commit
67b0cccc75
1 changed files with 1 additions and 1 deletions
|
@ -651,10 +651,10 @@ static void applyUpdates(void)
|
|||
}
|
||||
|
||||
io = fopen(item->fname, "rb");
|
||||
fclose(io);
|
||||
if (io != NULL) {
|
||||
static int rollbackIndex = 0;
|
||||
char rollbackPath[64];
|
||||
fclose(io);
|
||||
item->rollback = ++rollbackIndex;
|
||||
snprintf(rollbackPath, sizeof (rollbackPath), "updates/rollbacks/%d", rollbackIndex);
|
||||
infof("Moving file for rollback: '%s' -> '%s'", item->fname, rollbackPath);
|
||||
|
|
Loading…
Reference in a new issue