Skip to content

Commit

Permalink
remove last slash
Browse files Browse the repository at this point in the history
  • Loading branch information
charlykeyko committed Mar 19, 2024
1 parent 7579367 commit bc1faf3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fplus-lib/src/core/allocator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ fn content_items_to_allocator_model(file: ContentItems) -> Result<AllocatorModel

match decode_allocator_model(&cleaned_content) {
Some(mut model) => {
let owner_repo_parts: Vec<&str> = model.application.allocation_bookkeeping.split('/').collect();
let mut owner_repo_parts: Vec<&str> = model.application.allocation_bookkeeping.split('/').collect();
// If last part is empty, remove it
if owner_repo_parts[owner_repo_parts.len() - 1].is_empty() {
owner_repo_parts.pop();
}
if owner_repo_parts.len() < 2 {
log::error!("Failed to parse allocator model");
return Err(LDNError::Load("Failed to parse allocator model".to_string()));
Expand Down

0 comments on commit bc1faf3

Please sign in to comment.