Breaking changes in file layout
Johannes Zarl-Zierl <[email protected]> Sun, 05 Apr 2020 21:48:30 +0200
| Newsgroups | gmane.comp.kde.kimdaba |
|---|---|
| Message-ID | <8822682.hRzefixddd@mani> |
Hi everybody, I'm thinking about introducing some breaking changes in KPhotoAlbum 5.7 (or maybe 5.8) regarding the file layout. As you know, kphotoalbum creates a bunch of files and directories: DBDIR/index.xml DBDIR/CategoryImages/ DBDIR/layout.dat DBDIR/exif-info.db DBDIR/.thumbnails/ DBDIR/.videoThumbnails XDG_DATA_DIR/kxmlgui5/kphotoalbum/kphotoalbumui.rc XDG_CONFIG_DIR/kphotoalbumrc This directory layout worked ok, but has some shortcomings: - it's unclear to the user which files they can safely delete - potential problems with DBDIR on non-local storage -> there are occasional problems with people on NFS -> SQLITE files on CIFS seem to be unsupported - different performance requirements: -> the cache files have different access patterns than the images themselves - sharing an image directory across different computers can lead to subtle problems (e.g. different thumbnail size) Therefore, I plan on restructuring the file hierarchy like this: DBDIR/index.xml DBDIR/CategoryImages XDG_CACHE_DIR/kphotoalbum/<db>/exif-info.db XDG_CACHE_DIR/kphotoalbum/<db>/.thumbnails/ XDG_CACHE_DIR/kphotoalbum/<db>/.videoThumbnails/ XDG_DATA_DIR/kxmlgui5/kphotoalbum/kphotoalbumui.rc XDG_DATA_DIR/kphotoalbum/<db>/layout.dat XDG_CONFIG_DIR/kphotoalbumrc The "<db>" part in these paths would be the md5 sum of DBDIR/index.xml (e.g. "echo -n /home/johannes/Pictures/index.xml | md5sum"). As was previously pointed out, some settings in kphotoalbumrc may also be better moved directly into the index.xml file (e.g. the "untagged category" info). I would propose making these changes at the same time... Any thoughts? Cheers, Johannes