Summary: | Add a CRC on config files throu kconfigbackend | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | douard |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED NOT A BUG | ||
Severity: | wishlist | CC: | cfeck |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | My kdeglobals INIFile after corruption |
Description
douard
2003-11-12 21:58:07 UTC
If the user edits the file manually the CRC will be incorrect. Yes, that may be a problem. Maybe there should be a little tool for regenerating the CRC stamp in a config file... With a comment, at the beginnig of every config file, telling the command to execute after a manually modification on the file, no user should be "surprised" by this feature. Every config file could look like this : --------------------------------------------------------------------------------------------- ## This configuration file is marked. If you modify it, you should run the following ## command : "kstamp $filemane" after any manual modification, or it will be ## ignored by the application ## ## MD5SUM="XXXXXXX" [Item 1] foo=bar ... --------------------------------------------------------------------------------------------- I think the md5 sum should be run on the active part of the file only. So comments and blank lines do not interfere in md5 sum. I put double # in order to easily detect the "header" part of the file that should be overrided by kstamp. David Created attachment 6145 [details]
My kdeglobals INIFile after corruption
Notice that the first part of the file is binary!
It is the kernel/file systems responsibility to ensure the data is intact. If an application crashes while writing the file, that crash should be fixed instead. If an application crashes because of a corrupted file, it also should be fixed in that application. Remember that config files are editable by hand, so if you put junk in there, the application should correctly ignore it. I prepended the junk from that file to my kwriterc, but got no crash. If KConfig crashes when parsing such files as added to this bug, please add the backtrace. No response, changing status. Please reopen, if you have more information. |