/* There is no going back */
if (strcmp(path, "/") == 0)
goto nochange;
+ if (testopendir(path) == 0) {
+ printwarn();
+ goto nochange;
+ }
dir = xdirname(path);
free(path);
path = dir;
switch (sb.st_mode & S_IFMT) {
case S_IFDIR:
+ if (testopendir(path) == 0) {
+ printwarn();
+ goto nochange;
+ }
free(path);
path = xrealpath(name);
/* Reset filter */
}
/* Test initial path */
- if (!testopendir(ipath))
+ if (testopendir(ipath) == 0)
printerr(1, ipath);
/* Set locale before curses setup */