Skip to content

Commit

Permalink
Added debug output when launching xdg-utils.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 7, 2009
1 parent 3eea083 commit 5a6d26b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions platform_unix.c
Expand Up @@ -1123,8 +1123,8 @@ static char *shellEscape(const char *str)

static boolean unix_launchXdgUtil(const char *util, const char **argv)
{
boolean retval = false;
char *path = findBinaryInPath(util);
int rc = 0;

if (path != NULL) // it's installed on the system; use that.
{
Expand All @@ -1143,18 +1143,20 @@ static boolean unix_launchXdgUtil(const char *util, const char **argv)
tmp = format("%0/%1 >/dev/null 2>&1", path, cmd);
free(cmd);
cmd = tmp;
retval = (system(cmd) == 0);
rc = system(cmd);
logDebug("system( %0 ) returned %1", cmd, numstr(rc));
free(cmd);
} // if

else // try our fallback copy of xdg-utils in GBaseArchive?
{
char *script = format("meta/xdg-utils/%0", util);
retval = (runScript(script, true, argv) == 0);
rc = runScript(script, true, argv);
logDebug("internal script '%0' returned %1", script, numstr(rc));
free(script);
} // if

return retval;
return (rc == 0);
} // unix_launchXdgUtil


Expand Down

0 comments on commit 5a6d26b

Please sign in to comment.