|
@@ -1690,6 +1690,7 @@ int CHSPScannerFSM::ScanImage(SpReqAnsContext<HSPScannerService_ScanImage_Req,
|
|
|
ctx->Answer(TransECWithRepeat(erroCode), GetLastUserCode());
|
|
|
nRes = 2;
|
|
|
}
|
|
|
+ ClearPictureFileSure(1);
|
|
|
return nRes;
|
|
|
}
|
|
|
|
|
@@ -1783,6 +1784,7 @@ int CHSPScannerFSM::ScanImageEx(SpReqAnsContext<HSPScannerService_ScanImageEx_Re
|
|
|
delete pBtImage;
|
|
|
pBtImage = NULL;
|
|
|
}
|
|
|
+ ClearPictureFileSure(2);
|
|
|
return nRes;
|
|
|
}
|
|
|
|
|
@@ -2021,22 +2023,7 @@ BOOL CHSPScannerFSM::DelAndGetNewFileName(CSimpleStringA& csfileName, bool bInBu
|
|
|
strAimPath = strPath + SPLIT_SLASH_STR + fileName;
|
|
|
|
|
|
UpdateAndWarnFileFindInDepBak(strAimPath, fileName, HSPScanner_UserErrorCode_FindFile_in_DepBak);
|
|
|
-#if 0
|
|
|
- ///*TODO(80374374@10/11/2022): 这段代码上线一段时间后要去除,因为从这个版本开始这个文件就不生成在这个目录了 */
|
|
|
- if (ExistsFileA(strAimPath)) {
|
|
|
- if (DeleteFileA((LPCTSTR)strAimPath) != 0) {
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("DeleteFile(%s) suc.", (LPCTSTR)strAimPath);
|
|
|
- } else {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("DeleteFile(%s) failed LastError(%d).", (LPCTSTR)strAimPath, GetLastError());
|
|
|
- }
|
|
|
- }
|
|
|
- strPath.Clear();
|
|
|
- GetEntityBase()->GetFunction()->GetPath("Temp", strPath);
|
|
|
- strAimPath = strPath + SPLIT_SLASH_STR + fileName;
|
|
|
-#endif
|
|
|
- // Add [Josephus in 17:04:27 2016/10/25]
|
|
|
csfileName = strAimPath;
|
|
|
-
|
|
|
if (ExistsFileA(csfileName)) {
|
|
|
if (RemoveFileA((LPCTSTR)strAimPath) != 0) {
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("DeleteFile(%s) suc.", (LPCTSTR)strAimPath);
|
|
@@ -2250,6 +2237,7 @@ int CHSPScannerFSM::ScanImageJS(SpReqAnsContext<HSPScannerService_ScanImageJS_Re
|
|
|
ret = 1;
|
|
|
}
|
|
|
ctx->Answer(erroCode, GetLastUserCode());
|
|
|
+ ClearPictureFileSure(1);
|
|
|
return ret;
|
|
|
}
|
|
|
|