[Bug 59752] New: PROFILE_Save does not separate sections with empty line, leading to Ressource Hacker saving different ini file on 1st and 2nd run
http://bugs.winehq.org/show_bug.cgi?id=59752 Bug ID: 59752 Summary: PROFILE_Save does not separate sections with empty line, leading to Ressource Hacker saving different ini file on 1st and 2nd run Product: Wine Version: 11.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@list.winehq.org Reporter: kyle.kcsoftwares@gmail.com Distribution: --- Resource Hacker 4.7.34 : https://web.archive.org/web/20180426130124if_/http://www.angusj.com/resource... On first run, .ini file is created in the following format [Section1] Name1=Val1 Name2=Val2 Name3=Val3 [Section2] Name4=Val4 Name5=Val5 Name6=Val6 After second run, .ini file is rewritten in the folowing format [Section1] Name1=Val1 Name2=Val2 Name3=Val3 [Section2] Name4=Val4 Name5=Val5 Name6=Val6 In Windows, it is written as 2nd run from the initial start. Analysis performed here with API Monitor https://jira.reactos.org/browse/CORE-15438?focusedId=147696&page=com.atlassi... show that " When Resource Hacker closes: - It checks for the ResourceHacker.ini file - If it is not present, it writes the initial contents using WriteFile (the text before the [MRU List] section - 277 bytes). The buffer of the application contains the double newlines as section separator. The handle is closed and the file is persistent on disk. - It calls WritePrivateProfileStringW for each MRU (1 to 8) - so 8 times - If the section [MRU List] is present, each MRU* entries are updated according (second time and further runs) - If the section [MRU List] is not present (like the first time you close the program), the section is created and the entire .ini file is rebuilt by the PROFILE_Save logic. The profile saving routine puts single new lines as section separator. - If it is present, it will read the memory the content, updates via WritePrivateProfileStringW and resave the content (those 347 bytes) " The guilty code is in kernel32/section.c PROFILE_Save which misses the additional CRLF between sections https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/kernel32/profile.c#L1... -- 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.
http://bugs.winehq.org/show_bug.cgi?id=59752 KRosUser <kyle.kcsoftwares@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Ubuntu URL| |https://web.archive.org/web | |/20180426130124if_/http://w | |ww.angusj.com/resourcehacke | |r/reshacker_setup.exe Keywords| |download -- 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.
participants (1)
-
WineHQ Bugzilla