summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes
diff options
context:
space:
mode:
authorHannah von Reth <vonreth@kde.org>2021-11-04 16:16:48 +0100
committerHannah von Reth <vonreth@kde.org>2021-11-09 08:39:38 +0100
commit740d652f2dcdc168bc2917279fb86ca83970da3c (patch)
treea0181bcb751a0959b33d0c93c503b37599137223 /src/corelib/mimetypes
parent1a984b3d2dde484d105d19265bc516ba18da2894 (diff)
Fix internal mimetypes db on Windows when compressed by an external tool
Ensure to use binary encoding when handling the output of the compression tool. With out this change \r are dropped and the compressed file is corrupted. Change-Id: Iaf9b1fc015a376682f793aff079f45d03b201aec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/mimetypes')
-rw-r--r--src/corelib/mimetypes/mime/generate.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/mimetypes/mime/generate.pl b/src/corelib/mimetypes/mime/generate.pl
index 4f2d7d5f2b..c2f96c3dd6 100644
--- a/src/corelib/mimetypes/mime/generate.pl
+++ b/src/corelib/mimetypes/mime/generate.pl
@@ -81,6 +81,7 @@ if (checkCommand("xmlstarlet")) {
if ($cmd) {
# Run the command and read everything
open CMD, "$cmd |";
+ binmode CMD;
$data = <CMD>;
close CMD;
die("Failed to run $cmd") if ($? >> 8);