diff options
author | George Hazan <george.hazan@gmail.com> | 2023-07-22 21:48:46 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-07-22 21:48:46 +0300 |
commit | 7fae2fb35b194f96198e1e0789ba034736b9b9cb (patch) | |
tree | 7e976c26ddf51f6868b1d66186c127b019f1c31c /protocols/Telegram/src/avatars.cpp | |
parent | f51a93d218c3e3184be365be1c078086493c6fed (diff) |
offline files to be stored inside usual folder for incoming files, not inside %profile_data%\\dlFiles
Diffstat (limited to 'protocols/Telegram/src/avatars.cpp')
-rw-r--r-- | protocols/Telegram/src/avatars.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Telegram/src/avatars.cpp b/protocols/Telegram/src/avatars.cpp index c5f60605ac..4a08866989 100644 --- a/protocols/Telegram/src/avatars.cpp +++ b/protocols/Telegram/src/avatars.cpp @@ -199,10 +199,11 @@ void CTelegramProto::ProcessFile(TD::updateFile *pObj) dbv.pszVal = (char *)pSlash;
db_event_setJson(F->ofd->hDbEvent, "f", &dbv);
- wszFullName.Truncate(wszFullName.ReverseFind('\\') + 1);
+ wszFullName.Truncate(wszFullName.ReverseFind('\\'));
wszFullName.Append(Utf2T(pSlash));
+ F->ofd->ResetFileName(wszFullName); // resulting ofd->wszPath may differ from wszFullName
- MoveFileW(wszExistingFile, wszFullName);
+ MoveFileW(wszExistingFile, F->ofd->wszPath);
NotifyEventHooks(g_plugin.m_hevEventEdited, 0, F->ofd->hDbEvent);
F->ofd->Finish();
|