rev 9719 - kde-extras/digikam/trunk/debian/patches

Achim Bohnet ach-guest at alioth.debian.org
Tue Mar 11 23:56:39 UTC 2008


Author: ach-guest
Date: 2008-03-11 23:56:39 +0000 (Tue, 11 Mar 2008)
New Revision: 9719

Added:
   kde-extras/digikam/trunk/debian/patches/10_lp201053_fix_download_rename_race.diff
Log:
digikam:
	eh, forgot to svn add the patch: 10_lp201053_fix_download_rename_race.diff

Added: kde-extras/digikam/trunk/debian/patches/10_lp201053_fix_download_rename_race.diff
===================================================================
--- kde-extras/digikam/trunk/debian/patches/10_lp201053_fix_download_rename_race.diff	                        (rev 0)
+++ kde-extras/digikam/trunk/debian/patches/10_lp201053_fix_download_rename_race.diff	2008-03-11 23:56:39 UTC (rev 9719)
@@ -0,0 +1,33 @@
+--- digikam-0.9.3.orig/digikam/utilities/cameragui/cameracontroller.cpp
++++ digikam-0.9.3/digikam/utilities/cameragui/cameracontroller.cpp
+@@ -370,7 +370,7 @@
+ 
+                 KURL tempURL(dest);
+                 tempURL = tempURL.upURL();
+-                tempURL.addPath( QString(".digikam-camera-tmp1-%1").arg(getpid()));
++                tempURL.addPath( QString(".digikam-camera-tmp1-%1").arg(getpid()).prepend(file));
+                 QString temp = tempURL.path();
+     
+                 bool result = d->camera->downloadItem(folder, file, tempURL.path());
+@@ -410,7 +410,7 @@
+ 
+                         KURL tempURL2(dest);
+                         tempURL2 = tempURL2.upURL();
+-                        tempURL2.addPath( QString(".digikam-camera-tmp2-%1").arg(getpid()));
++                        tempURL2.addPath( QString(".digikam-camera-tmp2-%1").arg(getpid()).prepend(file));
+                         temp = tempURL2.path();
+ 
+                         if (!jpegConvert(tempURL.path(), tempURL2.path(), file, losslessFormat))
+@@ -420,6 +420,12 @@
+                             unlink(QFile::encodeName(tempURL2.path()));
+                             result = false;
+                         }
++                        else
++                        {
++                            // Else remove only the first temp file.
++                            unlink(QFile::encodeName(tempURL.path()));
++                        }
++
+                     }
+                 }
+     




More information about the pkg-kde-commits mailing list