setup: Fix warning about unused result.
Just show an error dialog if the command fails.
This commit is contained in:
parent
a066000012
commit
2db2e37b14
1 changed files with 7 additions and 1 deletions
|
|
@ -116,6 +116,7 @@ static txt_dropdown_list_t *OPLTypeSelector(void)
|
|||
static void OpenMusicPackDir(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))
|
||||
{
|
||||
char *cmd;
|
||||
int result;
|
||||
|
||||
#if defined(__MACOSX__)
|
||||
cmd = M_StringJoin("open \"", music_pack_path, "\"", NULL);
|
||||
|
|
@ -124,8 +125,13 @@ static void OpenMusicPackDir(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))
|
|||
#else
|
||||
cmd = M_StringJoin("xdg-open \"", music_pack_path, "\"", NULL);
|
||||
#endif
|
||||
system(cmd);
|
||||
result = system(cmd);
|
||||
free(cmd);
|
||||
|
||||
if (result != 0)
|
||||
{
|
||||
TXT_MessageBox("Error", "Failed to open music pack directory.");
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigSound(TXT_UNCAST_ARG(widget), void *user_data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue