mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-25 07:51:48 -05:00
forgot a thing for secret key export
This commit is contained in:
parent
a221464f38
commit
7017527999
@ -458,6 +458,7 @@ public class ImportExportOperation extends BaseOperation {
|
||||
|
||||
// Create an output stream
|
||||
ArmoredOutputStream arOutStream = new ArmoredOutputStream(outStream);
|
||||
try {
|
||||
String version = PgpHelper.getVersionForHeader(mContext);
|
||||
if (version != null) {
|
||||
arOutStream.setHeader("Version", version);
|
||||
@ -470,7 +471,6 @@ public class ImportExportOperation extends BaseOperation {
|
||||
{ // export public key part
|
||||
byte[] data = cursor.getBlob(1);
|
||||
arOutStream.write(data);
|
||||
arOutStream.close();
|
||||
|
||||
okPublic += 1;
|
||||
}
|
||||
@ -483,6 +483,12 @@ public class ImportExportOperation extends BaseOperation {
|
||||
|
||||
okSecret += 1;
|
||||
}
|
||||
} finally {
|
||||
// make sure this is closed
|
||||
if (arOutStream != null) {
|
||||
arOutStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
updateProgress(progress++, numKeys);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user