fix: Route file writing through FileSystem#3614
Conversation
Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
|
Just realize the strategy with returning bool has an issue. since the caller doesn't know if it failed, or if it's an option picked by the user and will log a bunch of error with the sdk debug logger You might not be able to hide that all in the file writer abstraction, leaving the knowledge of the option to the callsites and hence skipping the operation altogether. Or change the interface to return some enum where it can be failure or disabled. Or return null boolean to be simple. and document that null means disable and true/false is the real output |
|
I'd like to keep the |
d587e19 to
88d63f0
Compare
Fixes #3607, getsentry/sentry-unity#1804
Problem
Writing to disk is restricted on platforms like the Switch, causing crashes. There's currently no way to properly opt-out of this. I.e. the SDK creates and tries to persist an ID to disk out-of-the-box.
Solution
DisableFileWrite.IFileSystemin place. Making sure to make it is respecting that flagFile.CreateandDirectory.Createand replace them withIFileSystem.TODO
create,move, anddelete` to prevent regressions