src/nnn.c | 4 +++- diff --git a/src/nnn.c b/src/nnn.c index 6faca85dd9b17dd7d392ee1eb91f5caace938e5d..544067f0adde58c4356b734abf7dea43eb1c8f44 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6432,8 +6432,10 @@ if (g_state.picked) return EXIT_SUCCESS; - if (runfile[0]) + if (runfile[0]) { + xstrsncpy(lastname, runfile, NAME_MAX + 1); runfile[0] = '\0'; + } clearfilter(); setdirwatch(); goto begin;