Skip to content

Commit

Permalink
Fix up path prefix check for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-zu committed Aug 18, 2023
1 parent b06c3dd commit 932924d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tough/src/target_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ fn clean_name(name: &str) -> Result<String> {
.context(error::TargetNameComponentsEmptySnafu { name })?
.as_os_str();

// If the first component isn't `/` then there is a bug or behavior change in
// If the first component isn't the main separator ( unix `/`, windows '\' ) then there is a bug or behavior change in
// absolutize_from.
ensure!(
first_component == "/",
first_component == std::path::MAIN_SEPARATOR_STR,
error::TargetNameRootMissingSnafu { name }
);

Expand Down

0 comments on commit 932924d

Please sign in to comment.