Have better error message if data/config folders can't be created because parent directory is missing
See https://github.com/toltec-dev/toltec/pull/350#issuecomment-839978312
innernet should attempt to create the folder if it doesn't exist, and give a more meaningful error if it's missing.
Huh, the ensure_dirs_exist(...) call at https://github.com/tonarino/innernet/blob/main/client/src/data_store.rs#L63 should be creating the directories if they don't exist. I feel like something else weird is going on - are there any weird permissions that might otherwise prevent the directory from being created?
I did a manual mkdir -p with no issues. Which you can barely make out in the second screenshot in the linked issue. I can't remember if the parent directory existed or not.
I've just tested, and it is indeed that the parent folder didn't exist yet.
Hmm, do we want to actually have innernet create /var/lib if it's missing? That seems like it may be problematic since it's typically assumed to exist on systems that use FHS (which is all the systems we support, currently).
It's probably fair to not create parent folders as it's something we have solved in toltec as part of the package install scripts. But it would be good to have a more user friendly if the parent folder is missing.
Sounds good, thanks again for opening the issue.