Skip to content

build is overeager to delete files in destination #436

Open
@Xaeroxe

Description

@Xaeroxe

In my repository I have folder called /book which contains the src files of our book. I, not entirely knowing what I was doing with mdbook ran mdbook build in the root of the repository. This builds a new book, and overwrote the src files in /book. Luckily this is a git repository so I didn't lose everything but I did lose about a half hour of writing. In order to prevent this in the future I'd recommend trying to detect if the files at the location mdbook is deleting from are actually html files from a previous build. If they are not, display an error: "directory_name_here is not empty and no html files were found, aborting, please remove files from this directory before continuing."

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement or feature requestC-papercutCategory: A small usability bugS-WishlistStatus: Wishlist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions