Open
Description
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."