mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Suppress session open failure msg in picker mode
This commit is contained in:
parent
54d760b9f5
commit
88f71ff35d
|
@ -3918,7 +3918,7 @@ static bool load_session(const char *sname, char **path, char **lastdir, char **
|
||||||
session_header_t header;
|
session_header_t header;
|
||||||
FILE *fsession;
|
FILE *fsession;
|
||||||
bool has_loaded_dynamically = !(sname || restore);
|
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 ssnpath[PATH_MAX];
|
||||||
char spath[PATH_MAX];
|
char spath[PATH_MAX];
|
||||||
|
|
||||||
|
@ -3942,11 +3942,15 @@ static bool load_session(const char *sname, char **path, char **lastdir, char **
|
||||||
|
|
||||||
fsession = fopen(spath, "rb");
|
fsession = fopen(spath, "rb");
|
||||||
if (!fsession) {
|
if (!fsession) {
|
||||||
|
if (!status) {
|
||||||
printmsg(messages[MSG_SEL_MISSING]);
|
printmsg(messages[MSG_SEL_MISSING]);
|
||||||
xdelay(XDELAY_INTERVAL_MS);
|
xdelay(XDELAY_INTERVAL_MS);
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status = FALSE;
|
||||||
|
|
||||||
if ((fread(&header, sizeof(header), 1, fsession) != 1)
|
if ((fread(&header, sizeof(header), 1, fsession) != 1)
|
||||||
|| (header.ver != SESSIONS_VERSION)
|
|| (header.ver != SESSIONS_VERSION)
|
||||||
|| (fread(&cfg, sizeof(cfg), 1, fsession) != 1))
|
|| (fread(&cfg, sizeof(cfg), 1, fsession) != 1))
|
||||||
|
|
Loading…
Reference in a new issue