diff --git a/DownloadInfo.cpp b/DownloadInfo.cpp index 22bb3dd2..3b75c61c 100644 --- a/DownloadInfo.cpp +++ b/DownloadInfo.cpp @@ -570,6 +570,7 @@ PostInfo::PostInfo() m_bParCheck = false; m_iParStatus = 0; m_eRequestParCheck = rpNone; + m_bRequestParCleanup = false; m_szProgressLabel = strdup(""); m_iFileProgress = 0; m_iStageProgress = 0; diff --git a/DownloadInfo.h b/DownloadInfo.h index a2e76603..ed9be65b 100644 --- a/DownloadInfo.h +++ b/DownloadInfo.h @@ -269,6 +269,7 @@ private: bool m_bParCheck; int m_iParStatus; ERequestParCheck m_eRequestParCheck; + bool m_bRequestParCleanup; EStage m_eStage; char* m_szProgressLabel; int m_iFileProgress; @@ -318,6 +319,8 @@ public: void SetParStatus(int iParStatus) { m_iParStatus = iParStatus; } ERequestParCheck GetRequestParCheck() { return m_eRequestParCheck; } void SetRequestParCheck(ERequestParCheck eRequestParCheck) { m_eRequestParCheck = eRequestParCheck; } + bool GetRequestParCleanup() { return m_bRequestParCleanup; } + void SetRequestParCleanup(bool bRequestParCleanup) { m_bRequestParCleanup = bRequestParCleanup; } void AppendMessage(Message::EKind eKind, const char* szText); Thread* GetScriptThread() { return m_pScriptThread; } void SetScriptThread(Thread* pScriptThread) { m_pScriptThread = pScriptThread; } diff --git a/ScriptController.cpp b/ScriptController.cpp index 931a4aab..d339c479 100644 --- a/ScriptController.cpp +++ b/ScriptController.cpp @@ -54,6 +54,7 @@ extern char* (*szEnvironmentVariables)[]; static const int POSTPROCESS_PARCHECK_CURRENT = 91; static const int POSTPROCESS_PARCHECK_ALL = 92; +static const int POSTPROCESS_ALLOK = 93; #ifndef WIN32 #define CHILD_WATCHDOG 1 @@ -647,9 +648,16 @@ void PostScriptController::Run() SetEnvVar(szVarname, pParameter->GetValue()); } -#ifndef DISABLE_PARCHECK int iResult = Execute(); - if (iResult == POSTPROCESS_PARCHECK_ALL) + + if (iResult == POSTPROCESS_ALLOK) + { + info("%s sucessful", szInfoName); + m_pPostInfo->SetRequestParCleanup(true); + } + +#ifndef DISABLE_PARCHECK + else if (iResult == POSTPROCESS_PARCHECK_ALL) { if (m_pPostInfo->GetParCheck()) { @@ -681,8 +689,6 @@ void PostScriptController::Run() m_pPostInfo->SetRequestParCheck(PostInfo::rpCurrent); } } -#else - Execute(); #endif m_pPostInfo->SetStage(PostInfo::ptFinished);