forked from qt-creator/qt-creator
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 <orgads@gmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user