Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Incompatible::DirectoryEncrypted with Ext4Error::Encrypted #412

Merged
merged 4 commits into from
Feb 10, 2025

Conversation

nicholasbishop
Copy link
Owner

@nicholasbishop nicholasbishop commented Feb 9, 2025

Reasons for moving this from Incompatible to a top-level error:

  1. The other errors in Incompatible prevent the filesystem from being loaded. However, the lack of support for encrypted directories just prevents those specific paths from being loaded. So any other Incompatible error is essentially fatal, but Incompatible::DirectoryEncrypted can be handled.
  2. If, in the future, support for reading encrypted directories is added, we'll still need an error in case the right encryption key isn't loaded.

The new error is named Encrypted instead of DirectoryEncrypted because although ext4 encryption is directory based, files within a directory can of course be encrypted too, so a more general name is appropriate.

#389

This will replace Incompatible::DirectoryEncrypted in later commits.

There are two reasons for moving this from `Incompatible` to a top-level
error:

1. The other errors in `Incompatible` prevent the filesystem from being
   loaded. However, the lack of support for encrypted directories just
   prevents those specific paths from being loaded. So any other
   `Incompatible` error is essentially fatal, but
   `Incompatible::DirectoryEncrypted` can be handled.
2. If, in the future, support for reading encrypted directories is
   added, we'll still need an error in case the right encryption key isn't
   loaded.

The new error is named `Encrypted` instead of `DirectoryEncrypted`
because although ext4 encryption is directory based, files within a
directory can of course be encrypted too, so a more general name is
appropriate.
@nicholasbishop nicholasbishop force-pushed the bishop-move-encrypted-err branch from 180423c to 0a2382d Compare February 10, 2025 18:38
@nicholasbishop nicholasbishop enabled auto-merge (rebase) February 10, 2025 18:38
@nicholasbishop nicholasbishop merged commit 08f5436 into main Feb 10, 2025
11 checks passed
@nicholasbishop nicholasbishop deleted the bishop-move-encrypted-err branch February 10, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants