|
@@ -51,11 +51,15 @@ void CSVNProc::Serialize(CArchive& ar)
|
|
|
|
|
|
void CSVNProc::SVNProcess(std::string strSVNAddress, std::string strSavePath, DWORD dwSVNVersion, SVNTYPE type)
|
|
|
{
|
|
|
+ TCHAR szFileName[MAX_PATH] = { 0 };
|
|
|
TCHAR szCommand[MAX_PATH] = { 0 };
|
|
|
+ // 删除之前的;
|
|
|
+ _stprintf_s(szFileName, _T("%ld"), m_svnpath);
|
|
|
+ DeleteFile(szFileName);
|
|
|
if ( type == SVN_EXPORT ) {
|
|
|
// 先删除要导出的路径;
|
|
|
_stprintf_s(szCommand, _T("/c rd /s /q %s"), strSavePath.c_str());
|
|
|
- ShellExecute(NULL, _T("open"), _T("cmd"), szCommand, NULL, SW_HIDE);
|
|
|
+ ShellExecute(NULL, _T("open"), _T("cmd"), szCommand, NULL, SW_HIDE);
|
|
|
// 再执行导出;
|
|
|
//_stprintf_s(szCommand, _T("/c svn export -r %d %s %s > data.jg &pause"), dwSVNVersion, strSVNAddress.c_str(), strSavePath.c_str());
|
|
|
_stprintf_s(szCommand, _T("/c svn export -r %d %s %s > %d"), dwSVNVersion, strSVNAddress.c_str(), strSavePath.c_str(), m_svnpath);
|
|
@@ -98,8 +102,7 @@ void CSVNProc::SVNProcess(std::string strSVNAddress, std::string strSavePath, DW
|
|
|
// 结束后进入文本结果识别;
|
|
|
CString str;
|
|
|
CStdioFile file;
|
|
|
- _stprintf_s(szCommand, _T("%d"), m_svnpath);
|
|
|
- if (file.Open(szCommand, CFile::modeRead)) {
|
|
|
+ if (file.Open(szFileName, CFile::modeRead)) {
|
|
|
// 文件大小;
|
|
|
ULONGLONG ulSize = file.SeekToEnd();
|
|
|
file.SeekToBegin();
|