beyond-all-reason / beyond-all-reason/RecoilEngine
Check springsettings reading func
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
https://github.com/beyond-all-reason/spring/blob/ab88be7e235eba1417dbfa07e95277b480283c0b/rts/System/Config/ConfigSource.cpp#L58-L69
AFAICT this is supposed to just open the file (specifically `springsettings.cfg`) for reading. I think that:
* if the file doesn't exist, then "r" will fail and it is fine, and creating it via "a" is fine. It could produce a notice-level log.
* if the file exists but fails to be read there should be an error message (ideally with reason like "permissions"). Retrying via "a" is probably fine but idk if there is ever a case where that would help.
* if both methods fail the existing error log should say "could not read" and not "write".
Contributor guide
Research direction
Start with rts/System/Config/ConfigSource.cpp at lines 58-69 and trace the springsettings.cfg open and error paths. Verify the behavior for a missing file, an unreadable existing file, and failures of both attempts; done means the logs distinguish these cases and describe the final failure as reading rather than writing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100