Garmin: support .FIT files from filesystem even for MTP devices
If the caller provides us with a path name, we should not try to connect to the dive computer via MTP, but instead read the .FIT files from the path provided. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ea3e542450
commit
9554e87431
@ -414,6 +414,12 @@ garmin_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, void
|
||||
return rc;
|
||||
pathname[pathlen] = 0;
|
||||
|
||||
#ifdef HAVE_LIBMTP
|
||||
// if the user passes in a path, don't try to read via MTP
|
||||
if (pathlen)
|
||||
device->use_mtp = 0;
|
||||
#endif
|
||||
|
||||
// The actual dives are under the "Garmin/Activity/" directory
|
||||
// as FIT files, with names like "2018-08-20-10-23-30.fit".
|
||||
// Make sure our buffer is big enough.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user