utils: avoid compiler warning

This commit is contained in:
Dirk-Jan C. Binnema 2022-05-24 19:36:21 +03:00
parent 277a7e0e10
commit 046398b1ae
1 changed files with 6 additions and 3 deletions

View File

@ -639,10 +639,13 @@ Mu::TempDir::~TempDir()
}
/* ugly */
GError *err{};
const auto cmd{format("/bin/rm -rf '%s'", path_.c_str())};
(void)::system(cmd.c_str());
g_debug("removed '%s'", path_.c_str());
if (!g_spawn_command_line_sync(cmd.c_str(), NULL, NULL, NULL, &err)) {
g_warning("error: %s\n", err ? err->message : "?");
g_clear_error(&err);
} else
g_debug("removed '%s'", path_.c_str());
}
bool