Skip to content

Commit

Permalink
Partially revert "Temporarily fix rust-lang/rust#89658"
Browse files Browse the repository at this point in the history
This reverts commit da9b7b2.

rust-lang/rust#89665
  • Loading branch information
dylni committed Oct 24, 2021
1 parent 3b28d3c commit ed1418e
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,27 +143,11 @@ fn get_prefix(base: &BasePath) -> PrefixComponent<'_> {
}

fn push_separator(base: &mut BasePathBuf) {
// https://github.com/rust-lang/rust/issues/89658
/*
base.replace_with(|mut base| {
// Add a separator if necessary.
base.push("");
base
});
*/

const SEPARATOR: &str = "\\";

if let Some(Component::Prefix(prefix)) = base.components().next_back() {
if matches!(prefix.kind(), Prefix::Disk(_) | Prefix::VerbatimDisk(_)) {
return;
}
}
// This inefficient implementation must be used until the above issue is
// resolved.
if !base.0.to_string_lossy().ends_with(SEPARATOR) {
base.0.push(SEPARATOR);
}
}

pub(super) fn push(base: &mut BasePathBuf, initial_path: &Path) {
Expand Down

0 comments on commit ed1418e

Please sign in to comment.