Skip to content

Commit

Permalink
gocryptfs: Adjust error codes to v2.0
Browse files Browse the repository at this point in the history
With gocryptfs v2.0, error codes were fixed, see: rfjakob/gocryptfs#503
  • Loading branch information
mpobaschnig committed Nov 1, 2021
1 parent 96d3700 commit f746b82
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/backend/gocryptfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ fn status_to_err(status: Option<i32>) -> BackendError {
#[allow(dead_code)]
impl GocryptfsExitStatus {
pub const SUCCESS: i32 = 0;
// TODO: Change to correct error code once gocryptfs 2.0 is out
// see: https://github.com/rfjakob/gocryptfs/pull/503
pub const INVALID_CIPHER_DIR: i32 = 6;
pub const NON_EMPTY_CIPHER_DIR: i32 = 7;
pub const NON_EMPTY_CIPHER_DIR: i32 = 6;
pub const NON_EMPTY_MOUNT_POINT: i32 = 10;
pub const WRONG_PASSWORD: i32 = 12;
pub const EMPTY_PASSWORD: i32 = 22;
Expand All @@ -139,9 +136,6 @@ fn status_to_err(status: Option<i32>) -> BackendError {

match status {
Some(status) => match status {
GocryptfsExitStatus::INVALID_CIPHER_DIR => {
BackendError::ToUser(gettext("The encrypted data directory is not valid."))
}
GocryptfsExitStatus::NON_EMPTY_CIPHER_DIR => {
BackendError::ToUser(gettext("The encrypted data directory is not empty."))
}
Expand Down

0 comments on commit f746b82

Please sign in to comment.