Skip to content

Commit

Permalink
Avoid an unnecessary lstat call
Browse files Browse the repository at this point in the history
  • Loading branch information
twojstaryzdomu committed Jan 11, 2022
1 parent 43cf347 commit aed6235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flist.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ int link_stat(const char *path, STRUCT_STAT *stp, int follow_dirlinks)
if (update_links && S_ISLNK(stp->st_mode)) {
STRUCT_STAT st;
if (x_stat(path, &st, NULL) == 0 && !S_ISDIR(st.st_mode))
return x_lstat(path, stp, NULL);
return 0;
}
if (follow_dirlinks && S_ISLNK(stp->st_mode)) {
STRUCT_STAT st;
Expand Down

0 comments on commit aed6235

Please sign in to comment.