diff options
Diffstat (limited to 'src/engine/search.cpp')
| -rw-r--r-- | src/engine/search.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/engine/search.cpp b/src/engine/search.cpp index 2978edd3..1dbcf56b 100644 --- a/src/engine/search.cpp +++ b/src/engine/search.cpp | |||
| @@ -754,6 +754,7 @@ static HRESULT FileSearchVersion( | |||
| 754 | HRESULT hr = S_OK; | 754 | HRESULT hr = S_OK; |
| 755 | ULARGE_INTEGER uliVersion = { }; | 755 | ULARGE_INTEGER uliVersion = { }; |
| 756 | LPWSTR sczPath = NULL; | 756 | LPWSTR sczPath = NULL; |
| 757 | VERUTIL_VERSION* pVersion = NULL; | ||
| 757 | 758 | ||
| 758 | // format path | 759 | // format path |
| 759 | hr = VariableFormatString(pVariables, pSearch->FileSearch.sczPath, &sczPath, NULL); | 760 | hr = VariableFormatString(pVariables, pSearch->FileSearch.sczPath, &sczPath, NULL); |
| @@ -767,14 +768,18 @@ static HRESULT FileSearchVersion( | |||
| 767 | LogStringLine(REPORT_STANDARD, "File search: %ls, did not find path: %ls", pSearch->sczKey, sczPath); | 768 | LogStringLine(REPORT_STANDARD, "File search: %ls, did not find path: %ls", pSearch->sczKey, sczPath); |
| 768 | ExitFunction1(hr = S_OK); | 769 | ExitFunction1(hr = S_OK); |
| 769 | } | 770 | } |
| 770 | ExitOnFailure(hr, "Failed get file version."); | 771 | ExitOnFailure(hr, "Failed to get file version."); |
| 772 | |||
| 773 | hr = VerVersionFromQword(uliVersion.QuadPart, &pVersion); | ||
| 774 | ExitOnFailure(hr, "Failed to create version from file version."); | ||
| 771 | 775 | ||
| 772 | // set variable | 776 | // set variable |
| 773 | hr = VariableSetVersion(pVariables, pSearch->sczVariable, uliVersion.QuadPart, FALSE); | 777 | hr = VariableSetVersion(pVariables, pSearch->sczVariable, pVersion, FALSE); |
| 774 | ExitOnFailure(hr, "Failed to set variable."); | 778 | ExitOnFailure(hr, "Failed to set variable."); |
| 775 | 779 | ||
| 776 | LExit: | 780 | LExit: |
| 777 | StrSecureZeroFreeString(sczPath); | 781 | StrSecureZeroFreeString(sczPath); |
| 782 | ReleaseVerutilVersion(pVersion); | ||
| 778 | return hr; | 783 | return hr; |
| 779 | } | 784 | } |
| 780 | 785 | ||
