Hi guys!
I found a bug in project creation (and save) check: if the project path
is a writable directory, update_config() won't see that write will fail,
and no error at all will be reported to the user (though write will fail
on a directory).
I fixed this (in the attached patch) by:
1) check whether the path is not a directory, because
utils_is_file_writeable() [1] returns TRUE in this case, but write will
still fail. Perhaps it should rather be fixed in utils_is_file_writeable()?
2) check the return value of write_config(). This needed a little more
tuning for later calls to update_config() to work correctly, but now if
write actually fails, and even if update_config() reported no error, an
error will be displayed to the user and she will have a chance to retry.
There is a last write_config() that may file silently though, the one in
project_close(); not sure how this may be fixed.
Best regards,
Colomban
[1] shouldn't it be renamed utils_is_file_writable(), without the "e"?
Not sure though, but it looks weird to me and my spellchecker complains
about it...