MCPcopy Create free account
hub / github.com/WinMerge/winmerge / UnpackFile

Method UnpackFile

Src/InternalPlugins.cpp:339–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337 }
338
339 HRESULT STDMETHODCALLTYPE UnpackFile(BSTR fileSrc, BSTR fileDst, VARIANT_BOOL* pbChanged, INT* pSubcode, VARIANT_BOOL* pbSuccess) override
340 {
341 if (!m_info.m_unpackFile)
342 {
343 *pSubcode = 0;
344 *pbChanged = VARIANT_FALSE;
345 *pbSuccess = VARIANT_FALSE;
346 return S_OK;
347 }
348 TempFile scriptFile;
349 String command = replaceMacros(m_info.m_unpackFile->m_command, fileSrc, fileDst);
350 if (m_info.m_unpackFile->m_script)
351 {
352 createScript(*m_info.m_unpackFile->m_script, scriptFile);
353 strutils::replace(command, _T("${SCRIPT_FILE}"), scriptFile.GetPath());
354 }
355 DWORD dwExitCode;
356 HRESULT hr = launchProgram(command, SW_HIDE, dwExitCode);
357
358 *pSubcode = 0;
359 *pbChanged = SUCCEEDED(hr);
360 *pbSuccess = SUCCEEDED(hr);
361 return hr;
362 }
363
364 HRESULT STDMETHODCALLTYPE PackFile(BSTR fileSrc, BSTR fileDst, VARIANT_BOOL* pbChanged, INT subcode, VARIANT_BOOL* pbSuccess) override
365 {

Callers 6

CallUnpackFileMethod · 0.45
ApplyPatchTestFunction · 0.45
CompareMSExcelFilesTestFunction · 0.45
CompareMSWordFilesTestFunction · 0.45

Calls 4

launchProgramFunction · 0.85
SUCCEEDEDFunction · 0.85
replaceFunction · 0.50
GetPathMethod · 0.45

Tested by

no test coverage detected