Skip to content

Commit

Permalink
fix(koofr): create_dir when exist (#4062)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoslo authored Jan 24, 2024
1 parent 5dc2c7e commit 85a6e37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/services/koofr/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ impl KoofrCore {
let status = resp.status();

match status {
StatusCode::OK | StatusCode::CREATED => Ok(()),
// When the directory already exists, Koofr returns 400 Bad Request.
// We should treat it as success.
StatusCode::OK | StatusCode::CREATED | StatusCode::BAD_REQUEST => Ok(()),
_ => Err(parse_error(resp).await?),
}
}
Expand Down

0 comments on commit 85a6e37

Please sign in to comment.