[Bug 44310] WritePrivateProfileString doesn't check for flush errors

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Jan 9 05:57:53 CST 2018


https://bugs.winehq.org/show_bug.cgi?id=44310

--- Comment #4 from Omega Software <development at winomega.com> ---
Hi!

(In reply to Fabian Maurer from comment #3)
> Good catch, this is indeed problematic.
> You probably want to add a test case (should be easy enough) and then sent
> it to the mailing list once code-freeze is over.

I would, but I'm not sure what directory can be used in the test suite that is
guaranteed not to be writable. Any idea?

> While you're at it, there are more places where PROFILE_FlushFile is called.
> Do these show the same erroneous behavior? Like in
> "WritePrivateProfileSectionW", "WritePrivateProfileStructW"

They do. I've extended both the test case and the patch (attaching).

> Site not, I don't like chaining two methods that have side effects with "&&"
> like that. I'd probably prefer
> ------
> ret = PROFILE_SetString( section, entry, string, FALSE);
> ret &= PROFILE_FlushFile();

Yes, much more readable this way.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list