[Kde-games-devel] Bug or feature? Making write protection in Palapeli work on Windows
Stefan Majewsky
majewsky at gmx.net
Tue Dec 8 18:16:47 CET 2009
Hi,
Patrick Spendrin of kde-windows fame approached me a week ago that it is not
nice how I implement write protection in Palapeli.
Currently, Palapeli uses the file permissions to determine whether a puzzle
may be deleted or not. Consequently, the write flags are not set for the
default puzzles (during install time). Patrick informed me that this might
likely break on Windows, and it is also not usual to use the PERMISSIONS
syntax in CMake's install() directive.
Attached is a patch that changes the write protection mechanism: Instead of
checking the file permissions, Palapeli will forbid to delete any puzzle that
has the new "Collection/ModifyProtection" flag set. This patch
1. is backward-compatible: Older Palapeli versions will simply ignore this
flag.
2. is forward-compatible, in the sense that the update doesn't break anything:
The metadata cache in palapeli-collectionrc will be rewritten because the
puzzles have changed, and the new flag will be set accordingly.
3. does not introduce any new i18n strings.
However, I'm not sure whether this is a bug or a feature, i.e. whether I may
commit that to trunk now. Advice?
Greetings
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-palapeli-windowsfix.diff
Type: text/x-patch
Size: 7499 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20091208/20e4aea3/attachment.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20091208/20e4aea3/attachment.sig
More information about the kde-games-devel
mailing list