[Bug 22456] New: Wrong caching with INI functions
wine-bugs at winehq.org
wine-bugs at winehq.org
Thu Apr 22 08:18:20 CDT 2010
http://bugs.winehq.org/show_bug.cgi?id=22456
Summary: Wrong caching with INI functions
Product: Wine
Version: 1.1.41
Platform: x86
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: kernel32
AssignedTo: wine-bugs at winehq.org
ReportedBy: gabmoa at yahoo.it
Created an attachment (id=27506)
--> (http://bugs.winehq.org/attachment.cgi?id=27506)
Simple test program
I've written a program to manage some ini file and I've seen a wrong behaviour
in wine.
The origin of the problem I think is the cache system. I've isolated the
problem with a very simple program. The operations involved on button press
are:
1) Write the file test.ini with key value = WRONG (with
WritePrivateProfileStringA)
1a) Message on screen (ok to continue)
2) Delete ini file
3) Read the file test.ini (it doesn't exists now) with the default value =
RIGHT (with GetPrivateProfileStringA)
In Windows the result is RIGHT but in wine is WRONG, because it reads the
cached value! Only to obtain the compatibility with my software I've changed my
wine source in this way:
dlls/kernel32/profile.c
BOOL WINAPI WritePrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
LPCWSTR string, LPCWSTR filename )
{
...
ret = PROFILE_SetString( section, entry, string, FALSE);
// PROFILE_FlushFile(); // COMMENTED
if (CurProfile) PROFILE_ReleaseFile(); // INSERTED
...
}
NOTE:
I didn't test if other WritePrivateProfile* are affected by this problem or if
the problem instead is in the GetPrivateProfile*
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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