|
@@ -156,9 +156,10 @@ static BOOL FindMatchedFile(LPCSTR sFindPath, LPCSTR sFindFileName, ULONGLONG &u
|
|
|
BOOL fFinished = FALSE;
|
|
|
|
|
|
strcpy(sFormatFileName, sFindPath);
|
|
|
- if(sFindPath[strlen(sFindPath)-1] != '\\')
|
|
|
- {
|
|
|
- strcat(sFormatFileName, "\\*");
|
|
|
+ if(sFindPath[strlen(sFindPath)-1] != SPLIT_SLASH)
|
|
|
+ {
|
|
|
+ strcat(sFormatFileName, SPLIT_SLASH_STR);
|
|
|
+ strcat(sFormatFileName, "*");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -178,9 +179,9 @@ static BOOL FindMatchedFile(LPCSTR sFindPath, LPCSTR sFindFileName, ULONGLONG &u
|
|
|
while (!fFinished)
|
|
|
{
|
|
|
strcpy(sPath, sFindPath);
|
|
|
- if(sPath[strlen(sPath)-1] != '\\')
|
|
|
+ if(sPath[strlen(sPath)-1] != SPLIT_SLASH)
|
|
|
{
|
|
|
- strcat(sPath, "\\");
|
|
|
+ strcat(sPath, SPLIT_SLASH_STR);
|
|
|
}
|
|
|
strcat(sPath, FindFileData.cFileName);
|
|
|
|
|
@@ -484,15 +485,15 @@ ErrorCodeEnum CSalesRecorderEntity::__OnStart( ErrorCodeEnum preOperationError )
|
|
|
if (Error != Error_Succeed) {
|
|
|
LOG_TRACE("get global record temp path failed!");
|
|
|
}
|
|
|
- if (m_TempDir.GetLength() > 0 && m_TempDir[m_TempDir.GetLength()-1] != '\\') {
|
|
|
- m_TempDir += "\\";
|
|
|
+ if (m_TempDir.GetLength() > 0 && m_TempDir[m_TempDir.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ m_TempDir += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
Error = GetFunction()->GetPath("UploadVideo", m_RecordSaveDir);
|
|
|
if (Error != Error_Succeed) {
|
|
|
LOG_TRACE("get global record save path failed!");
|
|
|
}
|
|
|
- if (m_RecordSaveDir.GetLength() > 0 && m_RecordSaveDir[m_RecordSaveDir.GetLength()-1] != '\\') {
|
|
|
- m_RecordSaveDir += "\\";
|
|
|
+ if (m_RecordSaveDir.GetLength() > 0 && m_RecordSaveDir[m_RecordSaveDir.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ m_RecordSaveDir += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
|
|
|
return Error;
|
|
@@ -618,7 +619,11 @@ void CSalesRecorderEntity::OnTimeout( DWORD dwTimerID )
|
|
|
if (strstr(m_SalesVideoName, "OFL")) {
|
|
|
Dbg("On DISKCHK timer!");
|
|
|
int nFreeRatio = 0;
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
m_last_disk_overtop = !CheckDiskStatus("C:\\",m_max_disk_percent,&nFreeRatio);
|
|
|
+#else
|
|
|
+ m_last_disk_overtop = !CheckDiskStatus("/home/", m_max_disk_percent, &nFreeRatio);
|
|
|
+#endif
|
|
|
if (m_last_disk_overtop) {
|
|
|
CSimpleStringA msg = CSimpleStringA::Format("磁盘所剩空间不足%d%%,已停止离线双录!",100-m_max_disk_percent);
|
|
|
Dbg((LPCTSTR)msg);
|
|
@@ -999,8 +1004,8 @@ ErrorCodeEnum CSalesRecorderEntity::ShowVideo( const char *wmvfilename )
|
|
|
CSimpleStringA strPath;
|
|
|
ErrorCodeEnum Error = GetFunction()->GetPath("Temp", strPath);
|
|
|
if (Error == Error_Succeed) {
|
|
|
- if (strPath.GetLength() > 0 && strPath[strPath.GetLength()-1] != '\\') {
|
|
|
- strPath += "\\";
|
|
|
+ if (strPath.GetLength() > 0 && strPath[strPath.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ strPath += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
CSimpleStringA strFindFileName = CSimpleStringA::Format("%s*.wmv", wmvfilename);
|
|
|
ULONGLONG uVideoCount = 0;
|
|
@@ -1033,8 +1038,8 @@ ErrorCodeEnum CSalesRecorderEntity::PlaySalesRecordVideo( const char *wmvfilenam
|
|
|
CSimpleStringA strPath;
|
|
|
ErrorCodeEnum Error = GetFunction()->GetPath("Temp", strPath);
|
|
|
if (Error == Error_Succeed) {
|
|
|
- if (strPath.GetLength() > 0 && strPath[strPath.GetLength()-1] != '\\') {
|
|
|
- strPath += "\\";
|
|
|
+ if (strPath.GetLength() > 0 && strPath[strPath.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ strPath += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
CSimpleStringA strFindFileName = CSimpleStringA::Format("%s*.wmv", wmvfilename);
|
|
|
ULONGLONG uVideoCount = 0;
|
|
@@ -1065,8 +1070,8 @@ void CSalesRecorderEntity::DeleteAllVideo( const char *wmvfilename )
|
|
|
CSimpleStringA strPath;
|
|
|
ErrorCodeEnum Error = GetFunction()->GetPath("Temp", strPath);
|
|
|
if (Error == Error_Succeed) {
|
|
|
- if (strPath.GetLength() > 0 && strPath[strPath.GetLength()-1] != '\\') {
|
|
|
- strPath += "\\";
|
|
|
+ if (strPath.GetLength() > 0 && strPath[strPath.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ strPath += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
ULONGLONG uVideoCount = 0;
|
|
|
// 删除客户经理录像 edit by ly 2018/03/05
|
|
@@ -1140,8 +1145,8 @@ void CSalesRecorderEntity::DeleteVideo( const char *wmvfilename )
|
|
|
CSimpleStringA strPath;
|
|
|
ErrorCodeEnum Error = GetFunction()->GetPath("Temp", strPath);
|
|
|
if (Error == Error_Succeed) {
|
|
|
- if (strPath.GetLength() > 0 && strPath[strPath.GetLength()-1] != '\\') {
|
|
|
- strPath += "\\";
|
|
|
+ if (strPath.GetLength() > 0 && strPath[strPath.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ strPath += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
CSimpleStringA strFindFileName = CSimpleStringA::Format("%s*.wmv", wmvfilename);
|
|
|
ULONGLONG uVideoCount = 0;
|
|
@@ -1191,8 +1196,8 @@ ErrorCodeEnum CSalesRecorderEntity::SaveVideo( const char *wmvfilename )
|
|
|
ErrorCodeEnum Error = GetFunction()->GetPath("Temp", sourPath);
|
|
|
if(Error == Error_Succeed)
|
|
|
{
|
|
|
- if (sourPath.GetLength() > 0 && sourPath[sourPath.GetLength()-1] != '\\') {
|
|
|
- sourPath += "\\";
|
|
|
+ if (sourPath.GetLength() > 0 && sourPath[sourPath.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ sourPath += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
ULONGLONG uVideoCount = 0;
|
|
|
// 移动销售录像 edit by ly 2018/03/05
|
|
@@ -1209,8 +1214,8 @@ ErrorCodeEnum CSalesRecorderEntity::SaveVideo( const char *wmvfilename )
|
|
|
Error = GetFunction()->GetPath("UploadVideo", destPath);
|
|
|
if(Error == Error_Succeed)
|
|
|
{
|
|
|
- if (destPath.GetLength() > 0 && destPath[destPath.GetLength()-1] != '\\') {
|
|
|
- destPath += "\\";
|
|
|
+ if (destPath.GetLength() > 0 && destPath[destPath.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ destPath += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
CSimpleStringA sourFileName, destFileName;
|
|
|
BOOL bMoveSucc = TRUE;
|
|
@@ -1248,8 +1253,8 @@ ErrorCodeEnum CSalesRecorderEntity::SaveVideo( const char *wmvfilename )
|
|
|
Error = GetFunction()->GetPath("UploadVideo", destPath);
|
|
|
if(Error == Error_Succeed)
|
|
|
{
|
|
|
- if (destPath.GetLength() > 0 && destPath[destPath.GetLength()-1] != '\\') {
|
|
|
- destPath += "\\";
|
|
|
+ if (destPath.GetLength() > 0 && destPath[destPath.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ destPath += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
CSimpleStringA sourFileName, destFileName;
|
|
|
BOOL bMoveSucc = TRUE;
|
|
@@ -2323,12 +2328,12 @@ void CSalesRecorderEntity::UploadTempPathVideos()
|
|
|
ErrorCodeEnum Error = GetFunction()->GetPath("Temp", sourPath);
|
|
|
Error = GetFunction()->GetPath("UploadVideo", destPath);
|
|
|
|
|
|
- if (sourPath.GetLength() > 0 && sourPath[sourPath.GetLength()-1] != '\\') {
|
|
|
- sourPath += "\\";
|
|
|
+ if (sourPath.GetLength() > 0 && sourPath[sourPath.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ sourPath += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
|
|
|
- if (destPath.GetLength() > 0 && destPath[destPath.GetLength()-1] != '\\') {
|
|
|
- destPath += "\\";
|
|
|
+ if (destPath.GetLength() > 0 && destPath[destPath.GetLength()-1] != SPLIT_SLASH) {
|
|
|
+ destPath += SPLIT_SLASH_STR;
|
|
|
}
|
|
|
|
|
|
if(Error == Error_Succeed)
|