src/nnn.c | 10 +++++++--- diff --git a/src/nnn.c b/src/nnn.c index bc5d44b7fb3f67cc5d2c27e8331c237457183964..f19bc83503335be878725af4eda33ef8cff0d068 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3918,7 +3918,7 @@ int i = 0; session_header_t header; FILE *fsession; bool has_loaded_dynamically = !(sname || restore); - bool status = FALSE; + bool status = (sname && g_state.picker); /* Picker mode with session program option */ char ssnpath[PATH_MAX]; char spath[PATH_MAX]; @@ -3942,10 +3942,14 @@ save_session("@", NULL); fsession = fopen(spath, "rb"); if (!fsession) { - printmsg(messages[MSG_SEL_MISSING]); - xdelay(XDELAY_INTERVAL_MS); + if (!status) { + printmsg(messages[MSG_SEL_MISSING]); + xdelay(XDELAY_INTERVAL_MS); + } return FALSE; } + + status = FALSE; if ((fread(&header, sizeof(header), 1, fsession) != 1) || (header.ver != SESSIONS_VERSION)