I have some macros xsave-session and xsave_session_plus_toolbars that call save_window_config to save session data. The call to save_window_config hangs and I have to kill slick with task manager. The _workspace_save_state function in wkspace.e does exactly the same thing and presumably doesn't crash.
Later... I've discovered that if the fourth argument in the call to save_window_config has an embedded space in the path, the call hangs. i.e. if I change
#define SESSION_FOLDER_NAME 'SlickEdit Sessions'
to
#define SESSION_FOLDER_NAME 'SlickEditSessions'
the code works.
I don't mind removing the embedded space but I'm wondering whether the _workspace_save_state function will have a problem with embedded spaces too.
static int workspace_save_session(_str filename, boolean proj_only)
{
if (filename == '')
return 1;
// toolbarSaveExpansion(); // another day
int state_view_id = 0;
int orig_view_id = _create_temp_view(state_view_id);
p_window_id = orig_view_id;
save_window_config(proj_only, state_view_id, false, strip_filename(filename, 'N'));
p_window_id = orig_view_id;
int status = _ini_put_section(filename, "State", state_view_id);
if (status) {
clear_message();
}
return status;
}