[KimDaBa] Ouch! (data loss)

Robert L Krawitz rlk at alum.mit.edu
Sun Jan 2 11:54:10 CET 2005


This looks like the culprit.  Note that if the md5sum fails, it
doesn't restore the images.

        //remove every item of sorted from the images_list(the main list)
        //because we add all the images from sorted afterwards
        //(we would have them doubled if we wouldn't remove them)
        for( ImageInfoListIterator it3( sorted );*it3; ++it3 ) {
            if (!(images.removeRef((*it3)))){
                KMessageBox::error(0,i18n("MD5Sum failure; try recalcing your MD5Sums."));
                return;
            }
        }

        //insert sorted block of images in place of block of unsorted images
        // index represents the place of the first selected unsorted image
        for( ImageInfoListIterator it4( sorted );*it4; ++it4,index++){
            images.insert(index,(*it4));
        }

-- 
Robert Krawitz                                     <rlk at alum.mit.edu>

Tall Clubs International  --  http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- mail lpf at uunet.uu.net
Project lead for Gimp Print   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton



More information about the KimDaBa mailing list