Skip to content

Commit

Permalink
fcopy: Use lstat when copy directory.
Browse files Browse the repository at this point in the history
When copying directories use lstat when reading info about source files.
  • Loading branch information
gerasiov committed Aug 13, 2023
1 parent b782049 commit 6fe4908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fcopy/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static int fs_copydir(const char *infname, const struct stat *st, int ftype, str
}

// extract mode and ownership
if (stat(infname, &s) != 0)
if (lstat(infname, &s) != 0)
goto out;

uid_t uid = s.st_uid;
Expand Down

0 comments on commit 6fe4908

Please sign in to comment.