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

+ 6
- 1
src/nnn.c 파일 보기

@@ -1040,7 +1040,12 @@ static char *abspath(const char *path, const char *cwd)
size_t dst_size = 0, src_size = xstrlen(path), cwd_size = xstrlen(cwd);
const char *src;
char *dst;
char *resolved_path = malloc(src_size + (*path == '/' ? 0 : cwd_size) + 1);
/*
* We need to add 2 chars at the end as relative paths may start with:
* ./ (find .)
* no separator (fd .): this needs an additional char for '/'
*/
char *resolved_path = malloc(src_size + (*path == '/' ? 0 : cwd_size) + 2);
if (!resolved_path)
return NULL;



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