When creating a new, encrypted, 7z archive, Ark will always create an archive with header encryption enabled, regardless the checking status of the "Ask for password before showing the list of files in the archive" checkbox. Reproducible: Always
I think I figured it out. m_isHeaderEncryptionEnabled in ReadOnlyArchiveInterface is never initialized and since it's a boolean it will be true or false at random. It seems Part:: OpenFile() calls ArchiveModel::enableHeaderEncryption() which calls Archive::enableHeaderEncryption() which finally calls ReadOnlyArchiveInterface::setHeaderEncryptionEnabled() which sets m_isHeaderEncryptionEnabled. But this only gets done if the checkbox was checked. CliInterface::addFiles() uses ReadOnlyArchiveInterface::isHeaderEncryptionEnabled() to decide whether to activate header encryption when adding files. So if the checkbox is checked, then header encryption is guaranteed, but if it is unchecked header encryption will be active/inactive at random. Elvis, can you make a patch and provide a RR for Applications/15.08 branch?
Git commit b99086196be108dbc76c202bf78ef0e4b5ac8bee by Elvis Angelaccio. Committed on 24/09/2015 at 13:26. Pushed by elvisangelaccio into branch 'Applications/15.08'. Assume that header encryption is disabled This initialize ReadOnlyArchiveInterface::m_isHeaderEncryptionEnabled to false. The boolean member ReadOnlyArchiveInterface::m_isHeaderEncryptionEnabled is only set if the header encryption is explicitly enabled by the user. If not, its default value is used to enable or disable the header encryption. Since this variable was not initialized, the behavior was undefined when the checkbox was not checked. REVIEW: 125372 FIXED-IN: 15.08.2 M +3 -1 kerfuffle/archiveinterface.cpp http://commits.kde.org/ark/b99086196be108dbc76c202bf78ef0e4b5ac8bee