Hi guys,
I just recently gave QLandkarte GT another try and I am quite impressed
about the state of it right now! I just got into trouble when I tried to
do a bulk import of my waypoints, tracks and routes from my Oregon 400t.
The devices was mounted to /media/GARMIN and I could browse all files on
the device just fine, but when I selected "Download all" (or just the
waypoints or tracks) QLandkarte came up (after asking for the device
folder) with this error message:
Missing...
The selected path must have a subdirectory
'Garmin/gpx'. Should I create the path?
/media/GARMIN/Garmin/gpx
What made me wonder was the lower case "gpx" in that path, since for
sure the folder on the device is upper case. So I fetched the source and
searched for the error message, which appeared to be coming from
"CDeviceGarminBulk::aquire" in "src/CDeviceGarminBulk.cpp". But the
relevant variable was correctly set: "pathGpx = "Garmin/GPX";".
After some head scratching I decide to insert some cout commands and
track this down, which showed that pathGpx is being set to "Garmin/gpx"
after the invocation of "readDeviceXml()" and at that point I got
curious. I checked out the declaration of "readDeviceXml()" and that
seemed to be correct - so maybe the problem is coming from
"Garmin/GarminDevice.xml"? I ran that through xmlindent (XML is quite
unreadable without any line breaks and indentation...) and _BINGO_:
<DataType>
<Name>SavedTracks</Name>
<File>
<Specification>
<Identifier>
http://www.topografix.com/GPX/1/1
</Identifier>
<Documentation>
http://www.topografix.com/GPX/1/1/gpx.xsd
</Documentation>
</Specification>
<Location>
<Path>
Garmin/gpx
</Path>
<FileExtension>
GPX
</FileExtension>
</Location>
<TransferDirection>InputOutput</TransferDirection>
</File>
</DataType>
There we have that damn path set to "Garmin/gpx" :-( Since this is a FAT
file system it will not make any difference to the device or any Windows
software, but on Linux file names are case sensitive :-D
You can find my quick solution to this issue in the attached diff file.
After calling "readDeviceXml()" I check if "pathGpx" is _not_ an
existing directory and if instead "Garmin/GPX" is existing. If so I just
reset "pathGpx" to a reasonable value...
As you can see I still run 1.7.4, since 1.7.5 is not yet on the Debian
repos. But "CDeviceGarminBulk.cpp" has not been touched since June
anyway, so this will not be a problem. So please include this fix to
1.7.6 and hopefully I can then get back to the next Debian repos version
once that comes out.
Thanks for the great software you are maintaining and "keep on hackin'",
Stefan
--- qlandkartegt-1.7.4.orig/src/CDeviceGarminBulk.cpp
+++ qlandkartegt-1.7.4/src/CDeviceGarminBulk.cpp
@@ -111,6 +111,10 @@ bool CDeviceGarminBulk::aquire(QDir& dir
if(dir.exists("Garmin/GarminDevice.xml"))
{
readDeviceXml(dir.absoluteFilePath("Garmin/GarminDevice.xml"));
+ if(!dir.exists(pathGpx) && dir.exists("Garmin/GPX"))
+ {
+ pathGpx = "Garmin/GPX";
+ }
}
if(!dir.exists() || !dir.exists(pathGpx))
@@ -137,6 +141,10 @@ bool CDeviceGarminBulk::aquire(QDir& dir
if(dir.exists("Garmin/GarminDevice.xml"))
{
readDeviceXml(dir.absoluteFilePath("Garmin/GarminDevice.xml"));
+ if(!dir.exists(pathGpx) && dir.exists("Garmin/GPX"))
+ {
+ pathGpx = "Garmin/GPX";
+ }
}
if(!dir.exists(pathGpx))
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Qlandkartegt-users mailing list
Qlandkartegt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users