Improve client stability by handling exceptions

This commit is contained in:
yuanyuanxiang
2025-07-16 02:37:33 +08:00
parent 89c6e5014f
commit 965bb64864
23 changed files with 178 additions and 43 deletions

View File

@@ -845,7 +845,7 @@ void CFileManagerDlg::FixedRemoteFileList(BYTE* pbBuffer, DWORD dwBufferLen)
int iicon = GetIconIndex(pszFileName, nType);
nItem = m_list_remote.InsertItem(nItemIndex++, pszFileName, iicon);
m_list_remote.SetItemData(nItem, nType == FILE_ATTRIBUTE_DIRECTORY);
SHFILEINFO sfi;
SHFILEINFO sfi = {};
SHGetFileInfo(pszFileName, FILE_ATTRIBUTE_NORMAL | nType, &sfi, sizeof(SHFILEINFO), SHGFI_TYPENAME | SHGFI_USEFILEATTRIBUTES);
m_list_remote.SetItemText(nItem, 2, sfi.szTypeName);
}