Skip to content

Commit bc1faf3

Browse files
committed
remove last slash
1 parent 7579367 commit bc1faf3

File tree

1 file changed

+5
-1
lines changed
  • fplus-lib/src/core/allocator

1 file changed

+5
-1
lines changed

Diff for: fplus-lib/src/core/allocator/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ fn content_items_to_allocator_model(file: ContentItems) -> Result<AllocatorModel
5656

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

0 commit comments

Comments
 (0)