asicsforthemasses / LunaPnR

LunaPnR is a place and router for integrated circuits
GNU General Public License v3.0
40 stars 1 forks source link

Error if Home Directory Doesn't Exist #5

Open yrrapt opened 11 months ago

yrrapt commented 11 months ago

If the directory $HOME/lunapnr does not exist there is a catastrophic error:

bash
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
  what():  filesystem error: directory iterator cannot open directory: No such file or directory [/home/yrrapt/lunapnr]
[1]    151661 IOT instruction  ./lunapnr

It would be better if the directory was auto-created.

asicsforthemasses commented 10 months ago

Hi Thomas,

Thank you for the bug report.

A test for the existence during scanning of PDKs has been added to avoid generating an exception. When the first PDK is installed, the directory is created. Oddly enough, I didn't get an exception even though the directory didn't exist on my machine.

The fixed version is available in the main branch.

Regards, Niels.