소스 검색

Remove redundant search when entering directory

master
Arun Prakash Jana 8 년 전
부모
커밋
5aa4c799c0
No known key found for this signature in database GPG 키 ID: A75979F35C080412
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. +8
    -2
      nnn.c

+ 8
- 2
nnn.c 파일 보기

@@ -1065,13 +1065,18 @@ browse(char *ipath, char *ifilter)
struct stat sb;
regex_t re;
int r, fd;
enum action sel = SEL_RUNARG + 1;

xstrlcpy(path, ipath, sizeof(path));
xstrlcpy(fltr, ifilter, sizeof(fltr));
oldpath[0] = '\0';
newpath[0] = '\0';
begin:
r = populate(path, oldpath, fltr);

if (sel == SEL_GOIN && S_ISDIR(sb.st_mode))
r = populate(path, NULL, fltr);
else
r = populate(path, oldpath, fltr);
if (r == -1) {
printwarn();
goto nochange;
@@ -1080,7 +1085,8 @@ begin:
for (;;) {
redraw(path);
nochange:
switch (nextsel(&run, &env)) {
sel = nextsel(&run, &env);
switch (sel) {
case SEL_QUIT:
dentfree(dents);
return;


불러오는 중...
취소
저장