소스 검색

Ensure script to run is not a directory

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

+ 7
- 2
src/nnn.c 파일 보기

@@ -3404,12 +3404,17 @@ nochange:
tmp = newpath; tmp = newpath;
} }


/* Check if file exists */
if (access(tmp, F_OK) == -1) {
if (lstat(tmp, &sb) == -1) {
printwarn(); printwarn();
goto nochange; goto nochange;
} }


/* Check if it's a directory */
if (S_ISDIR(sb.st_mode)) {
printmsg("directory");
goto nochange;
}

dir = NULL; /* dir used as temp var */ dir = NULL; /* dir used as temp var */
if (ndents) if (ndents)
dir = dents[cur].name; dir = dents[cur].name;


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