aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/remote_filesystem.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/remote_filesystem.rs')
-rw-r--r--crates/shirabe/src/util/remote_filesystem.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/shirabe/src/util/remote_filesystem.rs b/crates/shirabe/src/util/remote_filesystem.rs
index 08e8581f..103a94a7 100644
--- a/crates/shirabe/src/util/remote_filesystem.rs
+++ b/crates/shirabe/src/util/remote_filesystem.rs
@@ -194,8 +194,12 @@ impl RemoteFilesystem {
self.redirects = 1; // The first request counts.
let mut temp_additional_options = additional_options.clone();
- if let Some(v) = temp_additional_options.get("retry-auth-failure").cloned() {
- retry_auth_failure = v.as_bool().unwrap_or(true);
+ if let Some(v) = temp_additional_options
+ .get("retry-auth-failure")
+ .and_then(|v| v.as_opt())
+ .cloned()
+ {
+ retry_auth_failure = v.to_bool();
temp_additional_options.shift_remove("retry-auth-failure");
}