INFO(SINK, "Encryption started...");
engine->encrypt(MasterKey, options);
setOptions(options & getSupportedOptions());
- INFO(SINK, "Sync disk...");
- sync();
INFO(SINK, "Encryption completed");
::vconf_set_str(EXTERNAL_STATE_VCONF_KEY, "encrypted");
context.notify("ExternalEncryption::mount");
+ INFO(SINK, "Sync disk...");
+ sync();
} catch (runtime::Exception &e) {
::vconf_set_str(EXTERNAL_STATE_VCONF_KEY, "error_partially_encrypted");
ERROR(SINK, "Encryption failed - " + std::string(e.what()));
INFO(SINK, "Decryption started...");
::vconf_set_str(EXTERNAL_STATE_VCONF_KEY, "error_partially_encrypted");
engine->decrypt(MasterKey, getOptions());
- INFO(SINK, "Sync disk...");
- sync();
INFO(SINK, "Decryption completed");
::vconf_set_str(EXTERNAL_STATE_VCONF_KEY, "unencrypted");
+ INFO(SINK, "Sync disk...");
+ sync();
} catch (runtime::Exception &e) {
ERROR(SINK, "Decryption failed - " + std::string(e.what()));
}