Replies: 3 comments
-
As pointed out on discord:
persistence.cpp
We don't currently have a single source of truth for this sort of logic. I'm fairly certain we don't deal properly with all of the possible cases involved in DF's "portable mode" toggle. And we are still loading and saving content from |
Beta Was this translation helpful? Give feedback.
-
We need to know
All else is just logic, and carefully choosing the correct directory in all cases. With fallbacks to match DF's behavior. Alternate proposal, just spitballing here:
|
Beta Was this translation helpful? Give feedback.
-
Based on observation and a conversation with Putnam, when reading DF always checks both locations and reads from whichever one has the file; what the portable mode toggle does is switch whether the installation root or the appdata root is checked first. If we want to be consistent with this behavior (and for savefiles and mods, we have to be), we have to use the same strategy. So it's not enough to just switch based on the portable mode flag; we have to actually always be prepared to check both locations. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
#5591 has illuminated the general problem that currently we have the logic for dealing with finding "files related to DF" spread out over a bunch of different places in the code, making it hard to ensure that all of these operations are being performed consistently. We should probably extend the
Filesystem
module in order to centralize these behaviors. But to do this, we need to actually come up with how the API should be revised. This means going through all the existing code that interacts with "files related to DF" to identify extractable patternsBeta Was this translation helpful? Give feedback.
All reactions