diff options
author | netblue30 <netblue30@protonmail.com> | 2023-11-24 17:01:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-24 17:01:00 -0500 |
commit | a9867d5da272f62d7ea4fc081906ca3f5b91fe86 (patch) | |
tree | 6dfe4e5ac82d87c3336a4cf7a688df773eb84fd1 /src | |
parent | Fix displaying of large file sizes. (#6086) (diff) | |
parent | fcopy: Use lstat when copy directory. (diff) | |
download | firejail-a9867d5da272f62d7ea4fc081906ca3f5b91fe86.tar.gz firejail-a9867d5da272f62d7ea4fc081906ca3f5b91fe86.tar.zst firejail-a9867d5da272f62d7ea4fc081906ca3f5b91fe86.zip |
Merge pull request #5957 from gerasiov/fcopy-fix-size-calculation
fcopy: Use lstat when copy directory.
Diffstat (limited to 'src')
-rw-r--r-- | src/fcopy/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fcopy/main.c b/src/fcopy/main.c index a56e8a91b..84fe44d73 100644 --- a/src/fcopy/main.c +++ b/src/fcopy/main.c | |||
@@ -277,7 +277,7 @@ static int fs_copydir(const char *infname, const struct stat *st, int ftype, str | |||
277 | 277 | ||
278 | // don't copy it if we already have the file | 278 | // don't copy it if we already have the file |
279 | struct stat s; | 279 | struct stat s; |
280 | if (stat(outfname, &s) == 0) { | 280 | if (lstat(outfname, &s) == 0) { |
281 | if (first) | 281 | if (first) |
282 | first = 0; | 282 | first = 0; |
283 | else if (!arg_quiet) | 283 | else if (!arg_quiet) |
@@ -286,7 +286,7 @@ static int fs_copydir(const char *infname, const struct stat *st, int ftype, str | |||
286 | } | 286 | } |
287 | 287 | ||
288 | // extract mode and ownership | 288 | // extract mode and ownership |
289 | if (stat(infname, &s) != 0) | 289 | if (lstat(infname, &s) != 0) |
290 | goto out; | 290 | goto out; |
291 | 291 | ||
292 | uid_t uid = s.st_uid; | 292 | uid_t uid = s.st_uid; |