New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev boost filesystem removal #789
Conversation
In order to remove boost:filesystem from CResourceManager Move() function has to be removed or rewrited. Since Move is only used in autosave rotation it's simpler to change autosave rotation and remove Move(). Now oldest autosaves (with lowest timestamp) will be removed in rotation.
|
👍, looks good, I'll test this when I have some time |
| } | ||
|
|
||
| int CRobotMain::GetAutosaveSlots() | ||
| { | ||
| return m_autosaveSlots; | ||
| } | ||
|
|
||
| int CRobotMain::AutosaveRotate(bool freeOne) | ||
| // Remove oldest saves with autosave prefix | ||
| void CRobotMain::AutosaveRotate() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the freeOne parameter broke behaviour of autosave rotation when changing amount of autosave slots in settings. Now when you adjust the number of slots, the AutosaveRotate function will remove one save too much (it assumes that a new save is going to be always created immediately after, which is not the case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess AutosaveRotate() call can be removed when setting slot number. This way it'll remain simple and it'll delete old saves on next autosave.
This pull request removes boost::filesystem from resource manager. Now boost::filesystem is only used before resource manager takes control. I did not touch CBot code and how files are handled there.
There's also small change to save naming.