@@ -131,7 +131,7 @@ bool CustomSubExplorerCommand::Accept(bool multipleFiles, FileType fileType, con
131131IFACEMETHODIMP CustomSubExplorerCommand::GetIcon (_In_opt_ IShellItemArray* items, _Outptr_result_nullonfailure_ PWSTR* icon) {
132132 wil::assign_null_to_opt_param (icon);
133133
134- std::wstring_view iconPath{ m_theme_type == ThemeType::Dark && _icon_dark.empty () ? _icon: _icon_dark };
134+ std::wstring_view iconPath{ m_theme_type == ThemeType::Dark && ! _icon_dark.empty () ? _icon_dark : _icon };
135135 if (iconPath.find (L" %" ) != std::string::npos)
136136 {
137137 wil::unique_cotaskmem_string path{};
@@ -201,7 +201,7 @@ IFACEMETHODIMP CustomSubExplorerCommand::Invoke(_In_opt_ IShellItemArray* select
201201 }
202202 std::wstring param =PathHelper::simpleFormat (paramView, replacements);
203203
204- std::wstring workingDirectory{ _working_directory.find (L" %" ) == std::string::npos ?_working_directory : wil::ExpandEnvironmentStringsW (_working_directory.c_str ()).get () };
204+ std::wstring workingDirectory{ _working_directory.find (L" %" ) == std::string::npos ? _working_directory : wil::ExpandEnvironmentStringsW (_working_directory.c_str ()).get () };
205205 if (workingDirectory.empty ()) {
206206 workingDirectory = parentPath;
207207 }
@@ -255,7 +255,7 @@ void CustomSubExplorerCommand::Execute(HWND parent, const std::wstring& path) {
255255 std::wstring param = PathHelper::simpleFormat (_param, replacements);
256256
257257 // TODO
258- std::wstring workingDirectory{ _working_directory.find (L" %" ) == std::string::npos? _working_directory: wil::ExpandEnvironmentStringsW (_working_directory.c_str ()).get () };
258+ std::wstring workingDirectory{ _working_directory.find (L" %" ) == std::string::npos ? _working_directory : wil::ExpandEnvironmentStringsW (_working_directory.c_str ()).get () };
259259 if (workingDirectory.empty ()) {
260260 workingDirectory = file.parent_path ().wstring ();
261261 }
@@ -266,7 +266,7 @@ void CustomSubExplorerCommand::Execute(HWND parent, const std::wstring& path) {
266266 PathHelper::replaceAll (workingDirectory, PARAM_PATH0, replacements[PARAM_PATH]);
267267 }
268268
269- const std::wstring exePath{ _exe.find (L" %" ) == std::string::npos? _exe : wil::ExpandEnvironmentStringsW (_exe.c_str ()).get () };
269+ const std::wstring exePath{ _exe.find (L" %" ) == std::string::npos ? _exe : wil::ExpandEnvironmentStringsW (_exe.c_str ()).get () };
270270 DEBUG_LOG (L" CustomSubExplorerCommand::Invoke menu={}, exe={}, param={}" , _title, exePath, param);
271271
272272 ShellExecute (parent, L" open" , exePath.c_str (), param.c_str (), workingDirectory.c_str (), _show_window_flag + 1 );
0 commit comments