Skip to content

Commit 02640e6

Browse files
committed
Accept multiple Comparer command-line file paths
1 parent aaea40e commit 02640e6

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/store-validation-trial.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ jobs:
179179
}
180180
181181
Capture-AppWindow "Viewer.exe" "`"$reference`"" "artifacts\screenshots\viewer.png"
182-
Capture-AppWindow "Comparer.exe" "`"$reference|$encoded`"" "artifacts\screenshots\comparer.png"
182+
Capture-AppWindow "Comparer.exe" "`"$reference`" `"$encoded`"" "artifacts\screenshots\comparer.png"
183183
184184
- name: Uninstall smoke-tested package
185185
shell: pwsh

Comparer/Comparer.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ CComparerApp::CComparerApp()
3030

3131
CComparerApp theApp;
3232

33+
class CComparerCommandLineInfo : public CCommandLineInfo
34+
{
35+
public:
36+
virtual void ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast)
37+
{
38+
if (!bFlag && m_nShellCommand == FileOpen && !m_strFileName.IsEmpty()) {
39+
m_strFileName += CSV_SEPARATOR;
40+
m_strFileName += pszParam;
41+
return;
42+
}
43+
44+
CCommandLineInfo::ParseParam(pszParam, bFlag, bLast);
45+
}
46+
};
47+
3348

3449
// CComparerApp initialization
3550

@@ -55,7 +70,7 @@ BOOL CComparerApp::InitInstance()
5570

5671

5772
// Parse command line for standard shell commands, DDE, file open
58-
CCommandLineInfo cmdInfo;
73+
CComparerCommandLineInfo cmdInfo;
5974
ParseCommandLine(cmdInfo);
6075

6176

0 commit comments

Comments
 (0)