We care about the directory we are going to, so there is no reason
to get locked inside there if the parent is readable.
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;