Skip to content

Build failed: src="../" (root in directory above book) breaks paths #1753

Open
@npanuhin

Description

@npanuhin

I found a bug that is very easy to reproduce.

Write the following to the config (book.toml):

[book]
src="../"

And then run, for example, mdbook build:

C:\Users\{path-to-the-book}>mdbook build
2022-02-21 18:00:53 [INFO] (mdbook::book): Book building has started
2022-02-21 18:00:53 [INFO] (mdbook::book): Running the html backend
2022-02-21 18:00:54 [ERROR] (mdbook::utils): Error: Rendering failed
2022-02-21 18:00:54 [ERROR] (mdbook::utils):    Caused By: Failed to read "C:\\Users\\{path-to-the-book}\\../mdbook\\book\\mdbook\\book\\mdbook\\book\\mdbook\\book\\mdbook\\book\\mdbook\\book\\mdbook\\book\\mdbook\\book\\mdbook\\book\\mdbook\\book\\mdbook\\book\\mdbook\\book\\FontAwesome\\fonts\\fontawesome-webfont.eot"
2022-02-21 18:00:54 [ERROR] (mdbook::utils):    Caused By: {System cannot find the path [written in my native language]} (os error 3)

File tree view: it recursively creates and fills several books:
изображение

If this is indeed a bug, can I bypass it somehow? I want to build a book with root located in the directory above the book (../).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions