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

Method WritePluginsInLogFile

Src/ConfigLog.cpp:158–192  ·  view source on GitHub ↗

* @brief Write plugin names */

Source from the content-addressed store, hash-verified

156 * @brief Write plugin names
157 */
158void CConfigLog::WritePluginsInLogFile(const wchar_t *transformationEvent)
159{
160 CVersionInfo EXEversion;
161 String sEXEPath = paths::GetPathOnly(paths::GetLongPath(EXEversion.GetFullFileName(), false));
162
163 // get an array with the available scripts
164 PluginArray * piPluginArray;
165
166 piPluginArray =
167 CAllThreadsScripts::GetActiveSet()->GetAvailableScripts(transformationEvent);
168
169 for (size_t iPlugin = 0 ; iPlugin < piPluginArray->size() ; iPlugin++)
170 {
171 const PluginInfoPtr& plugin = piPluginArray->at(iPlugin);
172 String sPluginText;
173 String sFileName = paths::GetLongPath(plugin->m_filepath);
174 if (sFileName.length() > sEXEPath.length())
175 if (sFileName.substr(0, sEXEPath.length()) == sEXEPath)
176 sFileName = _T(".") + sFileName.erase(0, sEXEPath.length());
177
178 String sModifiedTime = _T("");
179 sModifiedTime = GetLastModified(plugin->m_filepath);
180 if (!sModifiedTime.empty())
181 sModifiedTime = _T("[") + sModifiedTime + _T("]");
182
183 sPluginText = strutils::format
184 (_T("\r\n %s%-36s path=%s %s"),
185 plugin->m_disabled ? _T("!") : _T(" "),
186 plugin->m_name,
187 maskUserNameInPath(sFileName),
188 sModifiedTime
189 );
190 m_pfile->WriteString(sPluginText);
191 }
192}
193
194/**
195 * @brief String wrapper around API call GetLocaleInfo

Callers

nothing calls this directly

Calls 12

GetPathOnlyFunction · 0.85
GetLongPathFunction · 0.85
GetLastModifiedFunction · 0.85
maskUserNameInPathFunction · 0.85
GetAvailableScriptsMethod · 0.80
formatFunction · 0.50
sizeMethod · 0.45
atMethod · 0.45
lengthMethod · 0.45
eraseMethod · 0.45
emptyMethod · 0.45
WriteStringMethod · 0.45

Tested by

no test coverage detected