Page MenuHomeWildfire Games

Replay menu shouldn't crash when encountering an empty directory
ClosedPublic

Authored by elexis on Jun 21 2017, 4:24 PM.

Details

Summary

rP19674 / D39 introduced the replay cache and with it two GetFileInfo calls that assume that a replay subdirectory contains a commands.txt file.
If that file however doesn't exist for any reason, it will crash instead of ignoring that directory.

Test Plan

Create an empty directory in the replay folder. Notice checking for the return value isn't sufficient as the debug breakpoint will be triggered anyhow.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

elexis created this revision.Jun 21 2017, 4:24 PM
Imarok accepted this revision.Jun 21 2017, 4:39 PM

works

This revision is now accepted and ready to land.Jun 21 2017, 4:39 PM
This revision was automatically updated to reflect the committed changes.
Vulcan added a subscriber: Vulcan.Jun 21 2017, 5:13 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1600/ for more details.

Executing section Default...
Executing section Source...
Executing section JS...
Executing section XML GUI...
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/220/ for more details.