Skip to content

Commit

Permalink
fix: fix windows path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 1, 2021
1 parent 687a8e6 commit e900bf7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 12 additions & 0 deletions core_model/src/url_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ pub fn filename_suffix(text: &str, name_suffix: Option<&str>, file_suffix: Optio
}
};

if uri_path.host().is_none() {
let pth = PathBuf::from(uri_path.path());
let last = pth.file_name();

return format!(
"{}{}.{}",
last.unwrap().to_str().unwrap(),
filename_suffix,
suffix
);
}

let paths = uri_path
.path_segments()
.map(|c| c.collect::<Vec<_>>())
Expand Down
2 changes: 0 additions & 2 deletions plugins/coco_struct_analysis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ mod tests {
}

#[test]
#[ignore]
#[cfg(not(windows))]
fn should_run_struct_analysis() {
let mut repos = vec![];
repos.push(RepoConfig {
Expand Down

0 comments on commit e900bf7

Please sign in to comment.