noice.c | 4 +++- diff --git a/noice.c b/noice.c index a44388e4bf29ec2aeb83cac51de6a683e9b7d954..c3d3728f0fcdaf34b5d3007ff24845fd23bb6c68 100644 --- a/noice.c +++ b/noice.c @@ -658,7 +658,9 @@ dentfree(dents, n); return; case SEL_BACK: /* There is no going back */ - if (strcmp(path, "/") == 0) + if (strcmp(path, "/") == 0 || + strcmp(path, ".") == 0 || + strchr(path, '/') == NULL) goto nochange; if (canopendir(path) == 0) { printwarn();