use std::path::PathBuf;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum OxiNavError {
#[error("I/O error at {path}: {source}")]
Io {
path: PathBuf,
#[source]
source: std::io::Error,
},
#[error("destination already exists: {0}")]
DestinationExists(PathBuf),
#[error("source not found: {0}")]
SourceNotFound(PathBuf),
#[error("not a directory: {0}")]
NotADirectory(PathBuf),
#[error("unsupported archive format: {0}")]
UnsupportedArchive(PathBuf),
#[error("archive entry escapes the destination directory: {0}")]
UnsafeArchiveEntry(String),
}