mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Added some additional theme inventory debug logging to GuiThemeDownloader
This commit is contained in:
parent
2cd3e7af66
commit
f52f3a17a0
|
@ -470,7 +470,10 @@ void GuiThemeDownloader::resetRepository(git_repository* repository)
|
||||||
|
|
||||||
void GuiThemeDownloader::makeInventory()
|
void GuiThemeDownloader::makeInventory()
|
||||||
{
|
{
|
||||||
|
const auto totalInventoryTime {std::chrono::system_clock::now()};
|
||||||
|
|
||||||
for (auto& theme : mThemes) {
|
for (auto& theme : mThemes) {
|
||||||
|
const auto themeInventoryTime {std::chrono::system_clock::now()};
|
||||||
const std::string path {mThemeDirectory + theme.reponame};
|
const std::string path {mThemeDirectory + theme.reponame};
|
||||||
theme.invalidRepository = false;
|
theme.invalidRepository = false;
|
||||||
theme.corruptRepository = false;
|
theme.corruptRepository = false;
|
||||||
|
@ -519,8 +522,25 @@ void GuiThemeDownloader::makeInventory()
|
||||||
theme.hasLocalChanges = true;
|
theme.hasLocalChanges = true;
|
||||||
|
|
||||||
git_repository_free(repository);
|
git_repository_free(repository);
|
||||||
|
|
||||||
|
LOG(LogDebug) << "GuiThemeDownloader::makeInventory(): Theme \""
|
||||||
|
#if defined(_WIN64)
|
||||||
|
<< Utils::String::replace(path, "/", "\\")
|
||||||
|
<< "\" inventory completed in: "
|
||||||
|
#else
|
||||||
|
<< path << "\" inventory completed in: "
|
||||||
|
#endif
|
||||||
|
<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
|
std::chrono::system_clock::now() - themeInventoryTime)
|
||||||
|
.count()
|
||||||
|
<< " ms";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOG(LogDebug) << "GuiThemeDownloader::makeInventory(): Total theme inventory time: "
|
||||||
|
<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
|
std::chrono::system_clock::now() - totalInventoryTime)
|
||||||
|
.count()
|
||||||
|
<< " ms";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GuiThemeDownloader::renameDirectory(const std::string& path, const std::string& extension)
|
bool GuiThemeDownloader::renameDirectory(const std::string& path, const std::string& extension)
|
||||||
|
@ -1158,8 +1178,14 @@ bool GuiThemeDownloader::input(InputConfig* config, Input input)
|
||||||
"LOCAL CUSTOMIZATIONS",
|
"LOCAL CUSTOMIZATIONS",
|
||||||
"PROCEED",
|
"PROCEED",
|
||||||
[this] {
|
[this] {
|
||||||
|
#if defined(_WIN64)
|
||||||
|
const std::filesystem::path themeDirectory {
|
||||||
|
Utils::String::replace(mThemeDirectory, "/", "\\") +
|
||||||
|
mThemes[mList->getCursorId()].reponame};
|
||||||
|
#else
|
||||||
const std::filesystem::path themeDirectory {mThemeDirectory +
|
const std::filesystem::path themeDirectory {mThemeDirectory +
|
||||||
mThemes[mList->getCursorId()].reponame};
|
mThemes[mList->getCursorId()].reponame};
|
||||||
|
#endif
|
||||||
LOG(LogInfo) << "Deleting theme directory \"" << themeDirectory.string() << "\"";
|
LOG(LogInfo) << "Deleting theme directory \"" << themeDirectory.string() << "\"";
|
||||||
if (!Utils::FileSystem::removeDirectory(themeDirectory.string(), true)) {
|
if (!Utils::FileSystem::removeDirectory(themeDirectory.string(), true)) {
|
||||||
mWindow->pushGui(new GuiMsgBox(
|
mWindow->pushGui(new GuiMsgBox(
|
||||||
|
|
Loading…
Reference in a new issue