cp2 0.3.0

Pure-Rust cp & rsync-style copy/sync tool for local or network files, with delta transfer and verification (Linux, macOS, Windows)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Security module errors

/// Security-related errors (path sanitization, etc.)
#[derive(Debug, thiserror::Error)]
pub enum SecurityError {
    #[error("Absolute paths are not allowed")]
    AbsolutePathNotAllowed,

    #[error("Path traversal attempt detected")]
    TraversalAttempt,
}

pub type SecurityResult<T> = std::result::Result<T, SecurityError>;