aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-persist/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Remove users of fslock other than fslock-guard.Nick Mathewson2026-05-061-3/+0
| | | | | | There were two that relied on the the ability to have a lock in an unlocked state. Instead, we replace those with Option<LockFileGuard> or its equivalent.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* tor-persist: miri: disable tests that involve fs accessIan Jackson2024-10-081-1/+3
|
* Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-17/+17
| | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* tor-persist: Deprecate ErrorSource::Permissions, use InaccessibleIan Jackson2024-07-101-1/+9
|
* tor-persist: Correct message and description for mistrust errorIan Jackson2024-07-101-2/+4
|
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Use tor_basic_utils::PathExt::display_lossyIan Jackson2024-03-051-1/+2
| | | | | Change Path::display to this new function, in call sites where it's being used for a diagnostic.
* tor-persist: state_dir: Improve an error messageNick Mathewson2024-02-081-1/+1
|
* tor-persist: state_dir: Implement list_instancesIan Jackson2024-02-081-0/+3
|
* tor-persist: Add a test for Resource::InstanceStateIan Jackson2024-01-311-0/+38
| | | | | We should add more tests for these error representations but we want to rework these errors so let's not do all that now.
* tor-hsservice: state_dir: Quote some strings in an errorIan Jackson2024-01-311-1/+1
|
* tor-hsservice: state_dir: Fix a wrong error stringIan Jackson2024-01-311-1/+1
| | | | We use `/` to separate, not `+`.
* tor-hsservice: state_dir: Fix typogabi-2502024-01-311-1/+1
|
* tor-persist: state_dir: Implement acquire_instanceIan Jackson2024-01-311-0/+15
| | | | | | | And also instance_peek_storage, which needs to share some code, so determined the shape of this implementation. Make StateDirectory have the (one) field we need.
* tor-persist: Error: Provide for handling LocalResourceAlreadyInUseIan Jackson2024-01-311-0/+5
| | | | | state_dir doesn't support a "shared read-only" mode, so it needs an error.
* tor-persist: Error: Provide for handling BadSlugIan Jackson2024-01-311-1/+24
| | | | | | | Introduce a Bug variant. Then, use it for conversions from BadSlug. See the comment for why I think this is appropriate.
* Fix doc comments.Nick Mathewson2024-01-241-1/+1
|
* tor-persist: have load_store module provide deletionIan Jackson2024-01-241-0/+3
|
* tor-persist: Provide FsMistrustErrorExt, and use itIan Jackson2023-12-131-5/+2
| | | | | | | | | | | | | This code needs fs_mistrust::Error and tor_error::ErrorKind. I think we probably don't want fs_mistrust to depend on tor_error or vice versa. tor_persist is approximately the place where these two threads of thought come together, and it's currently the lowest place where this is needed. Use it in tor-dirmgr too, which is currently the other place that embodies this knowledge about fs_mistrust::Error.
* Test a couple more error cases in tor-persist.Nick Mathewson2022-12-061-1/+10
|
* Use anonymize_home() when displaying various messages.Nick Mathewson2022-08-311-2/+3
| | | | Closes #555
* tor-persist: Resource::Temporary: Mark with cfgIan Jackson2022-07-181-0/+1
| | | | Without this, some builds get a "variant is never constructed" warning.
* tor-persist: Big refactoring on Error type.Nick Mathewson2022-07-061-28/+100
| | | | | | | | | | | Every error now has an action (what we were trying to do), a resource (what we were trying to do it to), and a source (what problem we encountered). Initially I tried to add "action" and "resource" fields to error variants individually, but that led to a combinatorial explosion. Part of #323.
* tor-persist: Move Error to a module.Nick Mathewson2022-07-061-0/+74