소스 검색

Simplify cd

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

+ 10
- 8
src/nnn.c 파일 보기

@@ -5461,6 +5461,16 @@ nochange:
mkpath(path, dents[cur].name, newpath);
DPRINTF_S(newpath);

if (dents[cur].flags & DIR_OR_LINK_TO_DIR) {
if (chdir(newpath) == -1) {
printwarn(&presel);
goto nochange;
}

cdprep(lastdir, lastname, path, newpath) ? (presel = FILTER) : (watch = TRUE);
goto begin;
}

/* Cannot use stale data in entry, file may be missing by now */
if (stat(newpath, &sb) == -1) {
printwarn(&presel);
@@ -5469,14 +5479,6 @@ nochange:
DPRINTF_U(sb.st_mode);

switch (sb.st_mode & S_IFMT) {
case S_IFDIR:
if (chdir(newpath) == -1) {
printwarn(&presel);
goto nochange;
}

cdprep(lastdir, lastname, path, newpath) ? (presel = FILTER) : (watch = TRUE);
goto begin;
case S_IFREG:
{
/* If opened as vim plugin and Enter/^M pressed, pick */


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