I built the emulator using docker, when i try to run it is says:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/library.rs:62:42
It points to this code:
let path = home.as_ref().join(READING_STATES_DIRNAME);
if !path.exists() {
fs::create_dir(&path).ok();
}
for entry in fs::read_dir(&path).unwrap() { // Here it points
let entry = entry.unwrap();
let path = entry.path();
Its really weird, becouse the directory should have been created 2 lines earlier. I checked permissions, created the directory by myself, the result is still the same. Am I missing something?
I also added eprintln!("does READING_STATES_DIRNAME it exist {}", &path.exists()); before the unwrap() at it still says false, like the binary didn't have access to the file system.
I figured it out, the issue was the Settings.toml was coppied from the device, not generated from run-emulator.sh.
I thought running from docker and the script is a seperate thing
I built the emulator using docker, when i try to run it is says:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/library.rs:62:42
It points to this code:Its really weird, becouse the directory should have been created 2 lines earlier. I checked permissions, created the directory by myself, the result is still the same. Am I missing something?
I also added
eprintln!("does READING_STATES_DIRNAME it exist {}", &path.exists());
before the unwrap() at it still says false, like the binary didn't have access to the file system.