find data dir properly

This commit is contained in:
2023-04-28 22:34:17 -07:00
parent c5dcc2e50a
commit b761d3b493
5 changed files with 90 additions and 36 deletions

View File

@@ -91,6 +91,17 @@ pub enum SetupError {
AutoLaunchError(#[from] auto_launch::Error),
#[error("Failed to start listener: {0}")]
ServerSetupError(#[from] std::io::Error),
#[error("Failed to resolve data directory: {0}")]
DataDir(#[from] DataDirError),
}
#[derive(Debug, ThisError, AsRefStr)]
pub enum DataDirError {
#[error("Could not determine data directory")]
NotFound,
#[error("Failed to create data directory: {0}")]
Io(#[from] std::io::Error),
}