CrashSender attaches files still being written to even when using the MAKE_COPY option

22 views
Skip to first unread message

a For

unread,
Feb 11, 2016, 5:52:09 PM2/11/16
to Crashrpt
CErrorReportSender::CollectFilesBySearchTemplate() file_list.push_back(fi) line should be moved to after CollectSingleFile(&fi) otherwise it continues to zip the file from the original source path instead of the copied file.

...
if((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)==0)
{
CString sFile = sDir + _T("\\");
sFile += ffd.cFileName;

// Add file to file list.
ERIFileItem fi;
fi.m_sSrcFile = sFile;
fi.m_sDestFile = ffd.cFileName;
fi.m_sDesc = pfi->m_sDesc;
fi.m_bMakeCopy = pfi->m_bMakeCopy;
fi.m_bAllowDelete = pfi->m_bAllowDelete;
CollectSingleFile(&fi);

// Kaneva - Bug Fix - Moved After CollectSingleFile()
file_list.push_back(fi);

nFileCount++;
}
...
Reply all
Reply to author
Forward
0 new messages