DSpellCheck icon indicating copy to clipboard operation
DSpellCheck copied to clipboard

Do not try to write to user dictionary if it cannot be opened

Open Predelnik opened this issue 6 months ago • 2 comments

Fixes #363

Predelnik avatar Jun 27 '25 06:06 Predelnik

I still think that you shouldn't left there a code using blindly a file handle without checking if the system call succeeded. Maybe now it's ok for that R/O-case, but the _wfopen can fail also for other (not so obvious) reasons.

https://github.com/Predelnik/DSpellCheck/blob/a152beb134d091771829e11dd53a4b7a766fbef6/src/spellers/HunspellInterface.cpp#L36-L38

xomx avatar Jun 27 '25 08:06 xomx

Ok, thanks, I will add this check as well.

Predelnik avatar Jun 27 '25 08:06 Predelnik