mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Use the real file names for suffix extraction on Android
Many file URLs/paths that are passed to GPXSee on Android are unusable for extracting the file suffix due to the Android file name mangling. Use the converted "display names" for suffix extraction where possible.
This commit is contained in:
parent
00e8004042
commit
e34f77f1a1
@ -1,6 +1,7 @@
|
||||
#include <QApplication>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include "common/util.h"
|
||||
#include "gpxparser.h"
|
||||
#include "tcxparser.h"
|
||||
#include "csvparser.h"
|
||||
@ -94,7 +95,7 @@ void Data::processData(QList<TrackData> &trackData, QList<RouteData> &routeData)
|
||||
Data::Data(const QString &fileName, bool tryUnknown)
|
||||
{
|
||||
QFile file(fileName);
|
||||
QFileInfo fi(fileName);
|
||||
QFileInfo fi(Util::displayName(fileName));
|
||||
QList<TrackData> trackData;
|
||||
QList<RouteData> routeData;
|
||||
|
||||
|
@ -65,7 +65,7 @@ MapList::ParserMap MapList::_parsers = parsers();
|
||||
Map *MapList::loadFile(const QString &path, bool *isDir)
|
||||
{
|
||||
ParserMap::iterator it;
|
||||
QFileInfo fi(path);
|
||||
QFileInfo fi(Util::displayName(path));
|
||||
QString suffix(fi.completeSuffix().toLower());
|
||||
Map *map = 0;
|
||||
QStringList errors;
|
||||
|
Loading…
Reference in New Issue
Block a user