Check existing flags with an lstat(), not a stat().

Otherwise, restoring symlinks with flags consistently fails
(unionfs likes to set 'opaque' flags).
This commit is contained in:
kientzle 2007-04-12 04:27:29 +00:00
parent eafe3176c4
commit 4061e9fa91

View File

@ -1243,7 +1243,7 @@ set_fflags(struct archive *a, int fd, const char *name, mode_t mode,
/* Already have stat() data available. */
} else if (fd >= 0 && fstat(fd, &extract->st) == 0)
extract->pst = &extract->st;
else if (stat(name, &extract->st) == 0)
else if (lstat(name, &extract->st) == 0)
extract->pst = &extract->st;
else {
archive_set_error(a, errno,