mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Backport patch to fix creation of .tar archives when ZTD support is enabled.
As the patch says, when ZSTD support is present creating a regular .tar archive will end up creating a zstd file instead. In my tests, this prevented adding/remove entries from the archive at all. MFH: 2019Q1
This commit is contained in:
parent
70e77c11d3
commit
532ae65d80
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=495197
2 changed files with 27 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
PORTNAME= ark
|
||||
DISTVERSION= ${KDE_APPLICATIONS_VERSION}
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= archivers kde kde-applications
|
||||
|
||||
MAINTAINER= kde@FreeBSD.org
|
||||
|
|
26
archivers/ark/files/patch-git_a3bcf9bec
Normal file
26
archivers/ark/files/patch-git_a3bcf9bec
Normal file
|
@ -0,0 +1,26 @@
|
|||
commit a3bcf9becddd5725725089add15fbae39c79757e
|
||||
Author: Elvis Angelaccio <elvis.angelaccio@kde.org>
|
||||
Date: Sat Mar 9 13:05:35 2019 +0100
|
||||
|
||||
Fix creation of tar archives
|
||||
|
||||
Usage of QString::compare() breaks the creation of tar archives, because
|
||||
`zst` is "bigger" than `tar` which means ark would use the `zstd` filter
|
||||
even when creating a simple tar archive.
|
||||
|
||||
BUG: 405136
|
||||
FIXED-IN: 19.03.80
|
||||
|
||||
diff --git a/plugins/libarchive/readwritelibarchiveplugin.cpp b/plugins/libarchive/readwritelibarchiveplugin.cpp
|
||||
index 38f62881..e83d0087 100644
|
||||
--- plugins/libarchive/readwritelibarchiveplugin.cpp
|
||||
+++ plugins/libarchive/readwritelibarchiveplugin.cpp
|
||||
@@ -352,7 +352,7 @@ bool ReadWriteLibarchivePlugin::initializeNewFileWriterFilters(const Compression
|
||||
qCDebug(ARK) << "Detected lz4 compression for new file";
|
||||
ret = archive_write_add_filter_lz4(m_archiveWriter.data());
|
||||
#ifdef HAVE_ZSTD_SUPPORT
|
||||
- } else if (filename().rightRef(3).compare(QLatin1String("zst"), Qt::CaseInsensitive)) {
|
||||
+ } else if (filename().right(3).toUpper() == QLatin1String("ZST")) {
|
||||
qCDebug(ARK) << "Detected zstd compression for new file";
|
||||
ret = archive_write_add_filter_zstd(m_archiveWriter.data());
|
||||
#endif
|
Loading…
Add table
Reference in a new issue