You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Report::persist uses env::temp_dir() to get a base folder to save a panic report
/// Write a file to disk.pubfnpersist(&self) -> Result<PathBuf,Box<dynError + 'static>>{let uuid = Uuid::new_v4().hyphenated().to_string();let tmp_dir = env::temp_dir();let file_name = format!("report-{}.toml",&uuid);let file_path = Path::new(&tmp_dir).join(file_name);let toml = self.serialize().expect("only using toml-compatible types");
std::fs::write(&file_path, toml.as_bytes())?;Ok(file_path)}
However on some platforms TMPDIR may not be defined or be RO (yes, weird but true) . Sure TMPDIR may be overwritten when starting application however it would be nice to configure a base dir either as a parameter to ::handle_dump (breaking change) of through Metadata object
The text was updated successfully, but these errors were encountered:
If TMPDIR is not accessible, how do you plan to use a custom path to workaround the issue? I'm wondering if there is something to be generalized with that.
Currently
Report::persist
usesenv::temp_dir()
to get a base folder to save a panic reportHowever on some platforms TMPDIR may not be defined or be RO (yes, weird but true) . Sure TMPDIR may be overwritten when starting application however it would be nice to configure a base dir either as a parameter to ::handle_dump (breaking change) of through Metadata object
The text was updated successfully, but these errors were encountered: