Skip to content

Commit 1302359

Browse files
committed
write_disk_posix: rename variable in check_symlinks_fsobj()
Rename the flag "extracting_hardlink" to "checking_linkname" to be more accurate about its use. If the variable is non-zero it means that check_symlinks_fsobj() is called on the linkname when a hardlink is going to be created.
1 parent 5e646b8 commit 1302359

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

libarchive/archive_write_disk_posix.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2680,7 +2680,7 @@ fsobj_error(int *a_eno, struct archive_string *a_estr,
26802680
*/
26812681
static int
26822682
check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr,
2683-
int flags, int extracting_hardlink)
2683+
int flags, int checking_linkname)
26842684
{
26852685
#if !defined(HAVE_LSTAT) && \
26862686
!(defined(HAVE_OPENAT) && defined(HAVE_FSTATAT) && defined(HAVE_UNLINKAT))
@@ -2689,7 +2689,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr,
26892689
(void)error_number; /* UNUSED */
26902690
(void)error_string; /* UNUSED */
26912691
(void)flags; /* UNUSED */
2692-
(void)extracting_hardlink; /* UNUSED */
2692+
(void)checking_linkname; /* UNUSED */
26932693
return (ARCHIVE_OK);
26942694
#else
26952695
int res = ARCHIVE_OK;
@@ -2811,7 +2811,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr,
28112811
head = tail + 1;
28122812
}
28132813
} else if (S_ISLNK(st.st_mode)) {
2814-
if (last && extracting_hardlink) {
2814+
if (last && checking_linkname) {
28152815
#ifdef HAVE_LINKAT
28162816
/*
28172817
* Hardlinks to symlinks are safe to write

0 commit comments

Comments
 (0)