src/nnn.c | 3 ++- diff --git a/src/nnn.c b/src/nnn.c index 598d78db11d9a5c1df58eadd364ee891f23b8168..d0334f5af80720b59822f032c2eac3dbba49ad15 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1752,8 +1752,9 @@ static int scanselforpath(const char *path, bool getsize) { if (!path[1]) { /* path should always be at least two bytes (including NULL) */ + g_buf[0] = '/'; findselpos = pselbuf; - return TRUE; + return 1; /* Length of '/' is 1 */ } size_t off = xstrsncpy(g_buf, path, PATH_MAX);