summaryrefslogtreecommitdiffstats
path: root/src/sdk/installerbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdk/installerbase.cpp')
-rw-r--r--src/sdk/installerbase.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp
index 343a0a1ca..23d579de3 100644
--- a/src/sdk/installerbase.cpp
+++ b/src/sdk/installerbase.cpp
@@ -107,6 +107,12 @@ int InstallerBase::run()
QInstaller::BinaryContent::readBinaryContent(&binary, &oldOperations, &manager, &magicMarker,
cookie);
+ // Usually resources simply get mapped into memory and therefore the file does not need to be
+ // kept open during application runtime. Though in case of offline installers we need to access
+ // the appended binary content (packages etc.), so we close only in maintenance mode.
+ if (magicMarker != QInstaller::BinaryContent::MagicInstallerMarker)
+ binary.close();
+
CommandLineParser parser;
parser.parse(arguments());