tg_cli: fix "touch".

GitOrigin-RevId: 16654e7a90a33dcfdd8869616b51f28d6ca2ef66
This commit is contained in:
levlam 2018-05-15 13:01:15 +03:00
parent cbef086816
commit e2504be79b
2 changed files with 2 additions and 0 deletions

View File

@ -1365,6 +1365,7 @@ static auto credentials_as_jsonable(const std::vector<SecureValueCredentials> &c
Result<EncryptedSecureCredentials> get_encrypted_credentials(const std::vector<SecureValueCredentials> &credentials,
Slice payload, bool with_selfie, Slice public_key) {
auto encoded_credentials = json_encode<std::string>(credentials_as_jsonable(credentials, payload, with_selfie));
LOG(INFO) << "Created credentials " << encoded_credentials;
auto secret = secure_storage::Secret::create_new();
auto encrypted_value = secure_storage::encrypt_value(secret, encoded_credentials).move_as_ok();

View File

@ -3090,6 +3090,7 @@ class CliClient final : public Actor {
auto fd = r_fd.move_as_ok();
auto size = fd.get_size();
fd.seek(size).ignore();
fd.write("a").ignore();
fd.seek(size).ignore();
fd.truncate_to_current_position(size).ignore();