Bug 370440

Summary: KML Export fails when destination directory partition differs then the temp directory partition.
Product: [Applications] digikam Reporter: mettke
Component: Geolocation-KMLExportAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: caulier.gilles, metzpinguin
Priority: NOR    
Version: 5.2.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

Description mettke 2016-10-11 04:44:05 UTC
The temp directory in windows 7 and above is usually in the C:\Users\[username]\AppData\Local\Temp directory.  When you try use a 'destination directory' that is located on a drive/partition that is different then the C:\ drive (like the M:\ drive), the KML Export tools fails with the following error:

"Cannot move data to destination directory"

It looks the failure is on line 538 of the kmlexport.cpp file.  The problem is that the QDir rename function can't handle a rename across partitions (see http://doc.qt.io/qt-4.8/qdir.html#rename).  The actual creation of the KML file is successful, it is just not moved to the specified destination directory due to this issue.  You will find the exported KML file and images in a the temp directory, for example:

C:\Users\[username]\AppData\Local\Temp\kipi-kmlrexportplugin-8296

It took me awhile to figure out that the data was dumped to the temp directory.  I actually had to look through the code to figure this out.  So I doubt a non-programmer would be able to figure this out.

Reproducible: Always

Steps to Reproduce:
1. Select a image.
2. Select the Export > Export to KML... menu item.
3. Set the destination directory to something other then the C:\drive.
4. Click export.

Actual Results:  
The actual creation of the KML file is successful, it is just not moved to the specified destination directory due to this issue.  You will find the exported KML file and images in a the temp directory, for example:

C:\Users\[username]\AppData\Local\Temp\kipi-kmlrexportplugin-8296

Expected Results:  
The KML file and images are moved to the destination directory.

A possible workaround can be found here:

http://stackoverflow.com/questions/15130840/qdirrename-doesnt-work

I'm not sure if this is an issue on Unix based system, it just happens to me on a Windows 10 box.
Comment 1 Maik Qualmann 2016-10-11 05:54:05 UTC

*** This bug has been marked as a duplicate of bug 370025 ***
Comment 2 caulier.gilles 2019-07-14 19:30:00 UTC
Fixed with #370025 and not reproducible with 6.2.0