diff options
author | George Hazan <george.hazan@gmail.com> | 2024-06-06 16:18:43 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-06-06 16:18:43 +0300 |
commit | 5b70baa32617190d97f36e389c11140d389e093c (patch) | |
tree | 5e1ecfd6b577b0d6c49fe91e260076b65197d720 /protocols/ICQ-WIM/src/server.cpp | |
parent | cf9398bf479f55b792fc932f1fdadfe7d1deb3c3 (diff) |
fixes #4449 (ICQ: broken cloud file download)
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index c2ef85ff90..1135542926 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -176,7 +176,8 @@ IcqFileInfo *CIcqProto::RetrieveFileInfo(MCONTACT hContact, const CMStringW &wsz bool CIcqProto::CheckFile(MCONTACT hContact, CMStringW &wszText, IcqFileInfo *&pFileInfo)
{
CMStringW wszUrl;
- if (!fileText2url(wszText, &wszUrl))
+ int idx = fileText2url(wszText, &wszUrl);
+ if (!idx)
return false;
pFileInfo = nullptr;
@@ -186,9 +187,9 @@ bool CIcqProto::CheckFile(MCONTACT hContact, CMStringW &wszText, IcqFileInfo *&p if (!pFileInfo)
return false;
- if (wszUrl != wszText) {
- pFileInfo->szOrigUrl = wszUrl;
- wszText.Delete(0, wszUrl.GetLength() + 1);
+ if (idx != -1) {
+ pFileInfo->szOrigUrl = wszText.Mid(0, idx);
+ wszText.Delete(0, idx + 1);
}
else {
pFileInfo->szOrigUrl = wszText;
|