Browse Source

Handle parameters at end of URL

QGC4.4
Don Gagne 9 years ago
parent
commit
5764f436a4
  1. 6
      src/QGCFileDownload.cc

6
src/QGCFileDownload.cc

@ -33,6 +33,12 @@ bool QGCFileDownload::download(const QString& remoteFile) @@ -33,6 +33,12 @@ bool QGCFileDownload::download(const QString& remoteFile)
return false;
}
// Strip out parameters from remote filename
int parameterIndex = remoteFileName.indexOf("?");
if (parameterIndex != -1) {
remoteFileName = remoteFileName.left(parameterIndex);
}
// Determine location to download file to
QString localFile = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
if (localFile.isEmpty()) {

Loading…
Cancel
Save