diff options
author | lostd <lostd@2f30.org> | 2015-07-02 01:07:09 +0100 |
---|---|---|
committer | lostd <lostd@2f30.org> | 2015-07-02 01:07:09 +0100 |
commit | 1742598256abf086385b4fb4a2cf2a81fc6aff05 (patch) | |
tree | 0819681fcc0e9a9beba2f50bec3c02645386541b | |
parent | 0548a181e64bd9e5af6cc72282620356890b7bed (diff) | |
download | nnn-1742598256abf086385b4fb4a2cf2a81fc6aff05.tar.gz |
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.
-rw-r--r-- | noice.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |