From: lostd Date: Thu, 2 Jul 2015 00:07:09 +0000 (+0100) Subject: Escape unreadable dirs we are already into X-Git-Tag: v1.0~92^2~59 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=1742598256abf086385b4fb4a2cf2a81fc6aff05;p=nnn.git Escape unreadable dirs we are already into We care about the directory we are going to, so there is no reason to get locked inside there if the parent is readable. --- diff --git a/noice.c b/noice.c index ac965bd4..8fe09436 100644 --- a/noice.c +++ b/noice.c @@ -689,11 +689,12 @@ nochange: strcmp(path, ".") == 0 || strchr(path, '/') == NULL) goto nochange; - if (canopendir(path) == 0) { + dir = xdirname(path); + if (canopendir(dir) == 0) { + free(dir); printwarn(); goto nochange; } - dir = xdirname(path); /* Save history */ oldpath = path; path = dir;