Do not reload

This commit is contained in:
Arun Prakash Jana 2020-03-29 08:56:08 +05:30
parent 446266d4c7
commit 0bfc032e5d
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -691,7 +691,6 @@ static haiku_nm_h haiku_hnd;
/* Forward declarations */ /* Forward declarations */
static size_t xstrlcpy(char *dest, const char *src, size_t n); static size_t xstrlcpy(char *dest, const char *src, size_t n);
static int dentfill(char *path, struct entry **dents);
static void redraw(char *path); static void redraw(char *path);
static int spawn(char *file, char *arg1, char *arg2, const char *dir, uchar flag); static int spawn(char *file, char *arg1, char *arg2, const char *dir, uchar flag);
static int (*nftw_fn)(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf); static int (*nftw_fn)(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
@ -2493,8 +2492,9 @@ static int filterentries(char *path, char *lastname)
int r, total = ndents, len; int r, total = ndents, len;
char *pln = g_ctx[cfg.curctx].c_fltr + 1; char *pln = g_ctx[cfg.curctx].c_fltr + 1;
DPRINTF_S(__FUNCTION__);
if (ndents && (ln[0] == FILTER || ln[0] == RFILTER) && *pln) { if (ndents && (ln[0] == FILTER || ln[0] == RFILTER) && *pln) {
total = ndents = dentfill(path, &dents);
if (matches(pln) != -1) { if (matches(pln) != -1) {
move_cursor(dentfind(lastname, ndents), 0); move_cursor(dentfind(lastname, ndents), 0);
redraw(path); redraw(path);
@ -4379,6 +4379,8 @@ static int dentfill(char *path, struct entry **dents)
struct stat sb_path, sb; struct stat sb_path, sb;
DIR *dirp = opendir(path); DIR *dirp = opendir(path);
DPRINTF_S(__FUNCTION__);
if (!dirp) if (!dirp)
return 0; return 0;