// basics
if ( p -> object_type == pnd_object_type_directory ) {
- snprintf ( buffer, 1020, "Exec=%s%s -p %s -e %s -b %s",
+ snprintf ( buffer, 1020, "Exec=%s%s -p \"%s\" -e \"%s\" -b \"%s\"",
nohup, pndrun, p -> object_path, p -> exec,
p -> appdata_dirname ? p -> appdata_dirname : p -> unique_id );
} else if ( p -> object_type == pnd_object_type_pnd ) {
- snprintf ( buffer, 1020, "Exec=%s%s -p %s/%s -e %s -b %s",
+ snprintf ( buffer, 1020, "Exec=%s%s -p \"%s/%s\" -e \"%s\" -b \"%s\"",
nohup, pndrun, p -> object_path, p -> object_filename, p -> exec,
p -> appdata_dirname ? p -> appdata_dirname : p -> unique_id );
}
pnd_conf_get_as_char ( desktoph, "info.viewer_args" ), p -> info_filename );
} else {
pargs = NULL;
+ // WARNING: This might not be quite right; if no viewer-args, shouldn't we still append the info-filename? likewise,
+ // even if we do have view-args, shouldn't we check if filename is present?
}
char pndfile [ 1024 ];
snprintf ( pndfile, 1020, "%s/%s", p -> object_path, p -> object_filename );
}
- if ( ! pnd_apps_exec ( pndrun, pndfile, p -> unique_id, viewer, p -> startdir, pargs,
- p -> clockspeed ? atoi ( p -> clockspeed ) : 0, PND_EXEC_OPTION_NORUN ) )
- {
+ pnd_apps_exec_info_t info;
+ info.viewer = viewer;
+ info.args = pargs;
+
+ if ( ! pnd_apps_exec_disco ( pndrun, p, PND_EXEC_OPTION_NORUN | PND_EXEC_OPTION_INFO, &info ) ) {
return ( 0 );
}