Skip to content

rustup doc bad path separator on windows #3081

Open
@gfries

Description

@gfries

Problem

Windows 10
Version 21H2 Build (19044.2006)

rustup 1.25.1 (bb60b1e 2022-07-12)

The path to the file index.html is build by concatenating the folder and "index.html".
On Windows "/" instead of "" is used.

Steps

  1. rustup doc --book
  2. firefox fails to open D:\Rust\toolchains\stable-x86_64-pc-windows-msvc\share\doc\rust\html\book/index.html
  3. Should be D:\Rust\toolchains\stable-x86_64-pc-windows-msvc\share\doc\rust\html\book\index.html

Possible Solution(s)

No response

Notes

No response

Rustup version

rustup 1.25.1 (bb60b1e89 2022-07-12)

Installed toolchains

Default host: x86_64-pc-windows-msvc
rustup home:  D:\Rust

installed toolchains
--------------------

stable-x86_64-pc-windows-gnu
stable-x86_64-pc-windows-msvc

installed targets for active toolchain
--------------------------------------

wasm32-unknown-unknown
x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.64.0 (a55dd71d5 2022-09-19)

Activity

gfries

gfries commented on Oct 8, 2022

@gfries
Author

Problem description:
[Fix] On Windows "/" instead of "\" is used.

0xPoe

0xPoe commented on Oct 9, 2022

@0xPoe
Member

I think this because we store the path here.

("book", "The Rust Programming Language book", "book/index.html"),

And we use it here
doc_dir.push(relative);
.

added this to the On Deck milestone on Jul 10, 2024
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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gfries@0xPoe@rami3l

        Issue actions

          rustup doc bad path separator on windows · Issue #3081 · rust-lang/rustup