diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-10-28 12:32:54 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2021-10-29 09:56:08 +0300 |
commit | 6cd1ff494d4d7aadc12204789407679aa065b4a6 (patch) | |
tree | c438c330025fab6c601dc693328e157e24cf59bc /src/libs/installer | |
parent | 002b2e15d05a1a6784595855408c331531f03746 (diff) |
Fix creating archives containing Windows shortcuts
On Windows, QFileInfo::isSymLink() returns true for *.lnk files, which
unlike symlinks contain data - when creating an archive the writing was
incorrectly skipped.
Also add test case for creating and extracting archives containing
either symlinks or shortcuts.
Change-Id: I3ebbd28e889ffa17ece7378c3812244a55df20d5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer')
-rw-r--r-- | src/libs/installer/libarchivearchive.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/installer/libarchivearchive.cpp b/src/libs/installer/libarchivearchive.cpp index 4147214a8..46200560b 100644 --- a/src/libs/installer/libarchivearchive.cpp +++ b/src/libs/installer/libarchivearchive.cpp @@ -500,7 +500,7 @@ bool LibArchiveArchive::create(const QStringList &data) if (status < ARCHIVE_OK) throw Error(QLatin1String(archive_error_string(writer.get()))); - if (fileOrDir.isDir() || fileOrDir.isSymLink() || archive_entry_size(entry.get()) == 0) + if (fileOrDir.isDir() || archive_entry_size(entry.get()) == 0) continue; // nothing to copy QFile file(pathWithoutNamespace(QLatin1String(archive_entry_sourcepath(entry.get())))); |