MCPcopy Create free account
hub / github.com/amule-project/amule / RefreshSystemCaches

Function RefreshSystemCaches

src/AppImageIntegration.cpp:175–181  ·  view source on GitHub ↗

update-desktop-database and gtk-update-icon-cache exist on every desktop distro that ships a .desktop file system, but we don't fail integration if they're missing — modern compositors inotify-watch the dirs and pick up new files within seconds anyway. wxExecute with wxEXEC_SYNC still returns instantly if the binary isn't found.

Source from the content-addressed store, hash-verified

173// up new files within seconds anyway. wxExecute with wxEXEC_SYNC still
174// returns instantly if the binary isn't found.
175void RefreshSystemCaches(const wxString& userAppsDir, const wxString& userIconsDir)
176{
177 wxExecute(wxT("update-desktop-database \"") + userAppsDir + wxT("\""),
178 wxEXEC_SYNC | wxEXEC_NODISABLE | wxEXEC_NOEVENTS);
179 wxExecute(wxT("gtk-update-icon-cache -f -t \"") + userIconsDir + wxT("/hicolor\""),
180 wxEXEC_SYNC | wxEXEC_NODISABLE | wxEXEC_NOEVENTS);
181}
182
183bool DesktopFileAlreadyInstalled()
184{

Callers 1

PromptAndInstallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected