From 5764f436a448060ade32d3d68fb81b6687400ac6 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Mon, 13 Jun 2016 18:27:26 -0700 Subject: [PATCH] Handle parameters at end of URL --- src/QGCFileDownload.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/QGCFileDownload.cc b/src/QGCFileDownload.cc index 9a262ff09..43f3512f7 100644 --- a/src/QGCFileDownload.cc +++ b/src/QGCFileDownload.cc @@ -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()) { -- 2.22.0