Commit bd22d9b
authored
dtar: fix creation with symlink and --preserve-* (#629)
Fix creation of corrupted archive with symlink when
--preserve-{xattrs,acl,flags} command line option is used.
When it is provided a valid file descriptor, libarchive
archive_read_disk_entry_from_file() calls fstat() which follows
symlinks. This commit introduces an exception for symlinks to not
provide a file descriptor to archive_read_disk_entry_from_file() which
makes it call lstat() on entry path and create a valid symlink archive
entry eventually.
fix #628
Signed-off-by: Rémi Palancher <[email protected]>1 parent 412545e commit bd22d9b
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
431 | 441 | | |
432 | 442 | | |
433 | 443 | | |
| |||
0 commit comments