Closed Nic0 closed 13 years ago
Why bother so much about this? You will end up having to possibly create a whole directory structure. My suggestions is, that if the file cannot be written to, then just handle the error nicely and don't try much more.
But in addition to this, perhaps a default config should be created when tyrs is started for the first time. Since it does indeed use some default settings when the cfg file is not found, why not write those defaults to tyrs.cfg if it doesn't exist?
Agree with quite, the best idea is to create a .cfg when tyrs is first run. That way, anyone would just have to edit the .cfg with their own custom settings.
Ok then, let's go for some generating default config, as the generator is already done, it's will be easy to adapt for that. And you're right about the warning, probably safer that way indeed.
Thanks for your advice, I'll do this, as soon as I'll do some coding on it.
It should check for the directory, and ask to create it if it wasn't found.