[Kde-imaging] [Bug 116605] New: ImagesGallery plugins crahing when exporting to an existing dir an choosing no to overwrite

Matiyam matiyam at gmail.com
Fri Nov 18 09:14:56 CET 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=116605         
           Summary: ImagesGallery plugins crahing when exporting to an
                    existing dir an choosing no to overwrite
           Product: kipiplugins
           Version: unspecified
          Platform: Ubuntu Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kde-imaging kde org
        ReportedBy: matiyam gmail com


Version:           0.1+rc1-1ubuntu1 (using KDE KDE 3.4.3)
Installed from:    Ubuntu Packages
OS:                Linux

Digikam is always crashing in this situation (i have filled as a bug, not a crash because is not a big problem, it just lokks bad):


- I export a HTML album (with kipi-plugins, imagesgallery plugin) in some dir. It works
- I export again another album (i am just testing how it looks). I leave
the same directory destination than before
- A dialog appears: "The target folder "/path/to/KIPIHTMLExport" already
exists. Do you want to overwrite it?

- If I press "Yes", it gets overwriten (it works ok)
- BUT if I press "No", digikam crashes

I just get this in the console:
KCrash: Application 'digikam' crashing...
Unable to start Dr. Konqi

The code handling this is here (imagesgallery.cpp):

bool ImagesGallery::removeTargetGalleryFolder(void)
{
    QDir TargetDir;
    QString MainTPath = m_configDlg->getImageName() + "/KIPIHTMLExport";

    if (TargetDir.exists (MainTPath) == true)
       {
       if (KMessageBox::warningYesNo(kapp->activeWindow(),
           i18n("The target folder\n'%1'\nalready exists; do you want
overwrite it? (all data "
                "in this folder will be lost.)").arg(MainTPath)) ==
KMessageBox::Yes)
          {
          if ( DeleteDir(MainTPath) == false )
             {
             KMessageBox::error(kapp->activeWindow(), i18n("Cannot
remove folder '%1'.").arg(MainTPath));
             return false;
             }
          }
       }

    return true;
}

It looks that if the answer to KMessageBox::warningYesNo is "No", the
function returns true anyway.

I guess it should be like this:
--- imagesgallery.cpp.orig      2005-11-18 09:12:07.000000000 +0100
+++ imagesgallery.cpp   2005-11-18 09:13:32.000000000 +0100
 @ -280,6 +280,10  @
              }
           }
        }
+       else
+       {
+       return false;
+       }

     return true;
 }

Thanks a lof for sucha  great program!!


More information about the Kde-imaging mailing list