summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/src/proto.cpp')
-rw-r--r--protocols/Telegram/src/proto.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp
index 039bc6bcb9..d7cac65780 100644
--- a/protocols/Telegram/src/proto.cpp
+++ b/protocols/Telegram/src/proto.cpp
@@ -283,13 +283,17 @@ HANDLE CTelegramProto::FileAllow(MCONTACT, HANDLE hTransfer, const wchar_t *pwsz
if (ft == nullptr)
return nullptr;
+ ft->m_destPath = pwszSavePath;
+ ft->pfts.szCurrentFile.w = ft->m_fileName.GetBuffer();
+ ft->pfts.szWorkingDir.w = ft->m_destPath.GetBuffer();
+ SendQuery(new TD::downloadFile(ft->m_fileId, 5, 0, 0, false));
return ft;
}
-int CTelegramProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
+int CTelegramProto::FileCancel(MCONTACT, HANDLE hTransfer)
{
auto *ft = (TG_FILE_REQUEST *)hTransfer;
-
+ delete ft;
return 1;
}