From 9e5ba5d679323540f410c1deafa9b6715ca127bd Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 11 Jun 2021 22:03:16 +0900 Subject: [PATCH] Git: fix archive file name When a filename such as a.tar.gz is given and the filter tar.gz is selected, Qt Creator generated a.tar.gz.tar.gz because string from the filter doesn't start with a "." and QFileInfo::completeSuffix() starts with a ".". Change-Id: I58fedf79a88b25cd595e17adb8d5660e066658f0 Reviewed-by: Orgad Shaneh --- src/plugins/git/gitclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 2fa0d93d5de..96bb42a0eea 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -1248,7 +1248,7 @@ void GitClient::archive(const QString &workingDirectory, QString commit) return; QString extension = filters.value(selectedFilter); QFileInfo archive(archiveName); - if (archive.completeSuffix() != extension) { + if (extension != "." + archive.completeSuffix()) { archive = QFileInfo(archive.filePath() + extension); }