versotile-org/verso

Can't run from any sub-directory

Closed this issue · 3 comments

Hi there,

Problem Description

Can not run verso using cargo run from any sub directory. It shows error:

image

However, the resource folder is found correctly.

Also, if I run it from any other directory other from project root directory, same error is produced.

Reproduction

Run Verso using cargo run from any of sub-directories, or run the binary file from any other directory.

Ok, it turns out that demo.html must be present in the working directory. It is because it is hardcoded in src/app.rs to use demo.html

I think we can move demo.html to resources directory and also embed it.

I tried to embed all resource files instead of opening files with related paths.