From e2504be79b555bd2ab9da1ccb169cef3bc819350 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 15 May 2018 13:01:15 +0300 Subject: [PATCH] tg_cli: fix "touch". GitOrigin-RevId: 16654e7a90a33dcfdd8869616b51f28d6ca2ef66 --- td/telegram/SecureValue.cpp | 1 + td/telegram/cli.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/td/telegram/SecureValue.cpp b/td/telegram/SecureValue.cpp index 6b64c30a..60e5fcb5 100644 --- a/td/telegram/SecureValue.cpp +++ b/td/telegram/SecureValue.cpp @@ -1365,6 +1365,7 @@ static auto credentials_as_jsonable(const std::vector &c Result get_encrypted_credentials(const std::vector &credentials, Slice payload, bool with_selfie, Slice public_key) { auto encoded_credentials = json_encode(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(); diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index d120557f..08082e12 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -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();