Skip to content

Commit

Permalink
Fix filesize, use stat from dirent struct
Browse files Browse the repository at this point in the history
  • Loading branch information
rickgaiser committed Jan 9, 2021
1 parent df85c45 commit b7d4f85
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/supportbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ static int scanForISO(char *path, char type, struct game_list_t **glist)
char fullpath[256], startup[GAME_STARTUP_MAX];
struct dirent *dirent;
DIR *dir;
//struct stat st;

cache.games = NULL;
cache.count = 0;
Expand Down Expand Up @@ -353,13 +352,10 @@ static int scanForISO(char *path, char type, struct game_list_t **glist)
}
}

//sprintf(fullpath, "%s/%s", path, dirent->d_name);
//stat(fullpath, &st);

game->parts = 1;
game->media = type;
game->format = format;
game->sizeMB = -1; //st.st_size >> 20;
game->sizeMB = dirent->d_stat.st_size >> 20;

count++;
}
Expand Down

0 comments on commit b7d4f85

Please sign in to comment.