errexit();
begin:
+ /* Can fail when permissions change while browsing.
+ * It's assumed that path IS a directory when we are here.
+ */
+ if (access(path, R_OK) == -1) {
+ DPRINTF_S("directory inaccessible");
+ find_accessible_parent(path, newpath, lastname, &presel);
+ setdirwatch();
+ }
+
if (cfg.selmode && lastdir[0])
lastappendpos = selbufpos;
}
#endif
- /* Can fail when permissions change while browsing.
- * It's assumed that path IS a directory when we are here.
- */
- if (access(path, R_OK) == -1)
- printwarn(&presel);
-
populate(path, lastname);
if (g_states & STATE_INTERRUPTED) {
g_states &= ~STATE_INTERRUPTED;
}
/* If CWD is deleted or moved or perms changed, find an accessible parent */
- if (access(path, F_OK)) {
- DPRINTF_S("directory inaccessible");
- find_accessible_parent(path, newpath, lastname, &presel);
- setdirwatch();
+ if (access(path, F_OK))
goto begin;
- }
/* If STDIN is no longer a tty (closed) we should exit */
if (!isatty(STDIN_FILENO) && !cfg.picker) {
}
signal(SIGQUIT, SIG_IGN);
- /* Test initial path */
- if (!xdiraccess(initpath)) {
- xerror();
- return _FAILURE;
- }
-
#ifndef NOLOCALE
/* Set locale */
setlocale(LC_ALL, "");