Closed giuliomoro closed 3 years ago
It would only be realistic to check for this on startup, otherwise we're adding a lot of extra CPU usage for checking every folder exists every time it is used.
I don't think it's unreasonable for the IDE to expect a certain file structure and fail if it doesn't find it. But a decent error message would be nice at least.
sure you could just issue a mkdir -p $YOURBELAFOLDER/projects
at startup .
@LBDonovan I think this was fixed?
Nope.
Dec 20 20:16:46 bela node[12852]: { Error: ENOENT: no such file or directory, scandir '/root/Bela/projects/'
Dec 20 20:16:46 bela node[12852]: cause:
Dec 20 20:16:46 bela node[12852]: { Error: ENOENT: no such file or directory, scandir '/root/Bela/projects/'
Dec 20 20:16:46 bela node[12852]: errno: -2,
Dec 20 20:16:46 bela node[12852]: code: 'ENOENT',
Dec 20 20:16:46 bela node[12852]: syscall: 'scandir',
Dec 20 20:16:46 bela node[12852]: path: '/root/Bela/projects/' },
Dec 20 20:16:46 bela node[12852]: isOperational: true,
Dec 20 20:16:46 bela node[12852]: errno: -2,
Dec 20 20:16:46 bela node[12852]: code: 'ENOENT',
Dec 20 20:16:46 bela node[12852]: syscall: 'scandir',
Dec 20 20:16:46 bela node[12852]: path: '/root/Bela/projects/' }
If the
projects
folder does not exist, you start the IDE and you cannot even display or load examples. The IDE log gives this sort of things (alternating between "can't find projects/basic" and "can't find projects/" :expected behaviour: it should either print a warning or anyhow not hang (e.g.: it could create the projects folder itself).