Skip to content

Path::relative_from() doesn't account for case insensitivity on Windows #23264

Closed
@nukep

Description

@nukep

This has resulted in an issue in Cargo where rustdocs cannot be generated on Windows machines:
rust-lang/cargo#1393

use std::path::Path;
fn main() {
    let p = Path::new(r"C:\src\rust\cargo-test\test\Cargo.toml");
    println!("{:?}", p.relative_from(r"C:\src\rust\cargo-test\test"));
    println!("{:?}", p.relative_from(r"c:\src\rust\cargo-test\test"));
}
Some("Cargo.toml")
None

Activity

alexcrichton

alexcrichton commented on Mar 10, 2015

@alexcrichton
Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @steveklabnik@alexcrichton@nukep

        Issue actions

          Path::relative_from() doesn't account for case insensitivity on Windows · Issue #23264 · rust-lang/rust