Bug 117397

Summary: batch tool 'start' not disabled when target folder is not writeable orwith no image in list
Product: [Applications] digikam Reporter: Achim Bohnet <ach>
Component: BatchQueueManager-PluginsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 0.1.0

Description Achim Bohnet 2005-12-01 00:02:37 UTC
Version:           0.1.2 (using KDE 3.4.3, Kubuntu Package 4:3.4.3-0ubuntu1 )
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.12-10-686

well, the no image case is irretaging but wasting
lots cpu cicles just because the target folder is
not writable is a bit non-sense ;)

Achim
Comment 1 Angelo Naselli 2006-04-15 16:02:08 UTC
SVN commit 530136 by anaselli:

A workaround stops the process if the target directory is not writable.

BUG: 117397


 M  +12 -0     batchprocessimagesdialog.cpp  


--- trunk/extragear/libs/kipi-plugins/batchprocessimages/batchprocessimagesdialog.cpp #530135:530136
@@ -488,6 +488,16 @@
     // PENDING(blackie) handle remote URL's
     QString targetAlbum = m_upload->path().path();
 
+    //TODO check if it is valid also for remote URL's
+    // this is a workarond for bug 117397
+    QFileInfo dirInfo(targetAlbum + "/");
+    if (!dirInfo.isDir () || !dirInfo.isWritable())
+    {
+      KMessageBox::error(this, i18n("You must specify a writable path for your output file."));
+      endProcess();
+      return true;
+    }
+
     BatchProcessImagesItem *item = static_cast<BatchProcessImagesItem*>( m_listFile2Process_iterator->current() );
     m_listFiles->setCurrentItem(item);
 
@@ -519,6 +529,8 @@
     if ( KIO::NetAccess::exists( desturl ) == true )
 #endif
        {
+
+
        switch (overwriteMode())
           {
           case OVERWRITE_ASK:
Comment 2 Angelo Naselli 2006-04-15 16:03:25 UTC
about the second point (no images selected) the process does nothing
by now, so if you want the behavior to change open a wish.

Angelo