char spath[PATH_MAX];
int i;
session_header_t header;
+ FILE *fsession;
char *sname;
bool status = FALSE;
sname = !last_session ? xreadline(NULL, messages[SESSION_NAME]) : "@";
if (!sname[0])
return;
+ mkpath(sessiondir, sname, spath);
- FILE *fsession = fopen(spath, "wb");
+ fsession = fopen(spath, "wb");
if (!fsession) {
printwait("failed to open session file", presel);
return;
char spath[PATH_MAX];
int i = 0;
session_header_t header;
+ FILE *fsession;
bool has_loaded_dynamically = !(sname || restore);
bool status = FALSE;
if (!sname[0])
return FALSE;
- mkpath(sessiondir, sname ? sname : xreadline(NULL, messages[SESSION_NAME]), spath);
+ mkpath(sessiondir, sname, spath);
} else
mkpath(sessiondir, "@", spath);
if (has_loaded_dynamically)
save_session(TRUE, NULL);
- FILE *fsession = fopen(spath, "rb");
+ fsession = fopen(spath, "rb");
if (!fsession) {
printmsg("failed to open session file");
xdelay();