Skip to content

Commit

Permalink
Fix missing lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillof committed Jun 20, 2024
1 parent a8c8f41 commit 75b848a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion regress/ckmame-missing-list-changed.vtest
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
description write list of missing games to file, changed
return 0
arguments --missing-list missing-list --no-report-missing --report-changes
arguments -F --missing-list missing-list --no-report-missing --report-changes
file mame.db mame.db
file missing-list dummy missing-list.txt
file roms/zero.zip {} zero-ok.zip
file roms/zero-4.zip {} zero-ok.zip
file roms/.ckmame.db {} <empty.ckmamedb>
stdout
missing: 1 -> 17 (+17/-1)
end-of-inline-data
2 changes: 1 addition & 1 deletion src/Tree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void Tree::process(GameArchives *archives) {
ret = fix_game(game.get(), archives[0], &res);
}

if (ret == 0 && (res.game == GS_CORRECT || res.game == GS_OLD || res.game == GS_FIXABLE)) {
if (ret == 0 && (res.game == GS_CORRECT || res.game == GS_CORRECT_MIA|| res.game == GS_OLD || res.game == GS_FIXABLE)) {
ckmame_cache->complete_games.insert(game->name);
}

Expand Down
2 changes: 1 addition & 1 deletion src/ckmame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ bool CkMame::execute(const std::vector<std::string> &arguments) {
write_lines(configuration.complete_list, new_complete);
}
}
if (!configuration.missing_list.empty()) {
if (!configuration.missing_list.empty() && configuration.fix_romset) {
if (new_missing.empty()) {
std::filesystem::remove(configuration.missing_list, ec);
// TODO: throw all errors except ENOENT, if anyone can figure out how that's done in C++
Expand Down

0 comments on commit 75b848a

Please sign in to comment.