Skip to content

Commit

Permalink
Added new mimetype names of shared-mime-info V2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tsujan committed Nov 19, 2023
1 parent 9d4ba32 commit ac93b21
Show file tree
Hide file tree
Showing 26 changed files with 1,691 additions and 1,603 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ V0.12.0
* Fixed a bug in removal of files from archives.
* Make sure that ed-like special characters are escaped when making path patterns with bsdtar.
* Added a workaround for a nasty bug in bsdtar about start backslashes and the option "--strip-components".
* Added the new mimetype names of bz2 and disk/raw image archives.
* Added new mimetype names of `shared-mime-info` ≥ 2.3.

V0.11.0
--------
Expand Down
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Latest version:

26 Oct 2023, V0.12.0
19 Nov 2023, V0.12.0

See "ChangeLog" for changes.
8 changes: 4 additions & 4 deletions backends.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ void Backend::loadFile(const QString& path, bool withPassword) {
isGzip_ = true; is7z_ = false;
}
else if (mt == "application/x-7z-compressed"
|| mt == "application/x-ms-dos-executable" || mt == "application/x-msi"
|| mt == "application/x-ms-dos-executable" || mt == "application/vnd.microsoft.portable-executable" || mt == "application/x-msdownload" || mt == "application/x-msi"
|| mt == "application/vnd.ms-cab-compressed" || mt == "application/vnd.rar"
|| mt == "application/x-cd-image" || mt == "application/vnd.efi.iso" || mt == "application/vnd.appimage"
|| mt == "application/x-xz"
|| mt == "application/zstd"
|| mt == "application/x-ace"
|| mt == "application/x-bzip" || mt == "application/x-bzip2" || mt == "application/x-bzpdf" || mt == "application/x-xzpdf"
|| mt == "application/x-bzip" || mt == "application/x-bzip1" || mt == "application/x-bzip2" || mt == "application/x-bzpdf" || mt == "application/x-xzpdf"
|| mt == "application/x-apple-diskimage") {
is7z_ = true; isGzip_ = false;
}
Expand Down Expand Up @@ -209,11 +209,11 @@ void Backend::loadFile(const QString& path, bool withPassword) {
bool Backend::canModify(bool *canUpdate) const {
static QStringList validMimeTypes;
if (validMimeTypes.isEmpty()) {
validMimeTypes << "application/zip" << "application/x-compressed-tar" << "application/x-gzpdf" << "image/svg+xml-compressed" << "application/x-xz-compressed-tar" << "application/x-bzip-compressed-tar" << "application/x-bzip2-compressed-tar" << "application/x-tar" << "application/x-lzma-compressed-tar" << "application/x-zstd-compressed-tar" << "application/x-cpio" << /*".pax" <<*/ "application/x-archive" << /*".shar" <<*/ "application/gzip" << "application/x-7z-compressed";
validMimeTypes << "application/zip" << "application/x-compressed-tar" << "application/x-gzpdf" << "image/svg+xml-compressed" << "application/x-xz-compressed-tar" << "application/x-bzip-compressed-tar" << "application/x-bzip1-compressed-tar" << "application/x-bzip2-compressed-tar" << "application/x-tar" << "application/x-lzma-compressed-tar" << "application/x-zstd-compressed-tar" << "application/x-cpio" << /*".pax" <<*/ "application/x-archive" << /*".shar" <<*/ "application/gzip" << "application/x-7z-compressed";
}
static QStringList updatedMimeTypes;
if (updatedMimeTypes.isEmpty()) {
updatedMimeTypes << "application/zstd" << "application/x-bzip" << "application/x-bzip2" << "application/x-xz" << "application/vnd.debian.binary-package" << "application/x-rpm" << "application/x-source-rpm";
updatedMimeTypes << "application/zstd" << "application/x-bzip" << "application/x-bzip1" << "application/x-bzip2" << "application/x-xz" << "application/vnd.debian.binary-package" << "application/x-rpm" << "application/x-source-rpm";
}
QMimeDatabase mimeDatabase;
QString mimeTypeName = mimeDatabase.mimeTypeForFile(QFileInfo(filepath_)).name();
Expand Down
2 changes: 1 addition & 1 deletion data/arqiver.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Icon=arqiver
Terminal=false
Type=Application
Categories=Utility;
MimeType=application/x-xz-compressed-tar;application/x-xz;application/x-xzpdf;application/x-lzma-compressed-tar;application/x-zstd-compressed-tar;application/zstd;application/x-bzip-compressed-tar;application/x-bzip2-compressed-tar;application/x-bzip;application/x-bzip2;application/x-bzpdf;application/x-tar;application/x-compressed-tar;application/zip;application/gzip;image/svg+xml-compressed;application/x-gzpdf;application/x-7z-compressed;application/vnd.debian.binary-package;application/x-archive;application/x-cpio;application/x-rpm;application/x-source-rpm;application/x-cd-image;application/vnd.efi.iso;application/x-raw-disk-image;application/vnd.efi.img;application/x-xar;application/x-java-archive;application/x-ms-dos-executable;application/x-msi;application/vnd.ms-cab-compressed;application/x-ace;application/vnd.android.package-archive;application/vnd.rar;application/vnd.appimage;application/x-virtualbox-vbox-extpack;
MimeType=application/x-xz-compressed-tar;application/x-xz;application/x-xzpdf;application/x-lzma-compressed-tar;application/x-zstd-compressed-tar;application/zstd;application/x-bzip-compressed-tar;application/x-bzip1-compressed-tar;application/x-bzip2-compressed-tar;application/x-bzip;application/x-bzip1;application/x-bzip2;application/x-bzpdf;application/x-tar;application/x-compressed-tar;application/zip;application/gzip;image/svg+xml-compressed;application/x-gzpdf;application/x-7z-compressed;application/vnd.debian.binary-package;application/x-archive;application/x-cpio;application/x-rpm;application/x-source-rpm;application/x-cd-image;application/vnd.efi.iso;application/x-raw-disk-image;application/vnd.efi.img;application/x-xar;application/x-java-archive;application/x-ms-dos-executable;application/vnd.microsoft.portable-executable;application/x-msdownload;application/x-msi;application/vnd.ms-cab-compressed;application/x-ace;application/vnd.android.package-archive;application/vnd.rar;application/vnd.appimage;application/x-virtualbox-vbox-extpack;
X-KDE-StartupNotify=false
Loading

0 comments on commit ac93b21

Please sign in to comment.