mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-25 16:01:52 -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
|
// Create an output stream
|
||||||
ArmoredOutputStream arOutStream = new ArmoredOutputStream(outStream);
|
ArmoredOutputStream arOutStream = new ArmoredOutputStream(outStream);
|
||||||
|
try {
|
||||||
String version = PgpHelper.getVersionForHeader(mContext);
|
String version = PgpHelper.getVersionForHeader(mContext);
|
||||||
if (version != null) {
|
if (version != null) {
|
||||||
arOutStream.setHeader("Version", version);
|
arOutStream.setHeader("Version", version);
|
||||||
@ -470,7 +471,6 @@ public class ImportExportOperation extends BaseOperation {
|
|||||||
{ // export public key part
|
{ // export public key part
|
||||||
byte[] data = cursor.getBlob(1);
|
byte[] data = cursor.getBlob(1);
|
||||||
arOutStream.write(data);
|
arOutStream.write(data);
|
||||||
arOutStream.close();
|
|
||||||
|
|
||||||
okPublic += 1;
|
okPublic += 1;
|
||||||
}
|
}
|
||||||
@ -483,6 +483,12 @@ public class ImportExportOperation extends BaseOperation {
|
|||||||
|
|
||||||
okSecret += 1;
|
okSecret += 1;
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
// make sure this is closed
|
||||||
|
if (arOutStream != null) {
|
||||||
|
arOutStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
updateProgress(progress++, numKeys);
|
updateProgress(progress++, numKeys);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user