]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix Windows test regression 2921/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 18 Mar 2026 08:03:00 +0000 (09:03 +0100)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 18 Mar 2026 08:09:30 +0000 (09:09 +0100)
By only removing periods from error messages in Windows specific code,
but not adjusting its POSIX counterpart, the test fails on Windows but
not on POSIX systems.

Fix this by removing the period in test and in POSIX error messages.

Fixes: 3e0819b59e ("libarchive: Remove period from error messages")
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_write_disk_posix.c
libarchive/test/test_warn_missing_hardlink_target.c

index 7e4dba3c43577bc364f88c30ec421db33d93089d..7b90fc25fa54691966d6121b2a9e4c581aba49d8 100644 (file)
@@ -2119,7 +2119,7 @@ restore_entry(struct archive_write_disk *a)
 
        if ((en == ENOENT) && (archive_entry_hardlink(a->entry) != NULL)) {
                archive_set_error(&a->archive, en,
-                   "Hard-link target '%s' does not exist.",
+                   "Hard-link target '%s' does not exist",
                    archive_entry_hardlink(a->entry));
                return (ARCHIVE_FAILED);
        }
@@ -4019,7 +4019,7 @@ set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
 #elif defined(HAVE_CHFLAGS)
        if (S_ISLNK(a->st.st_mode)) {
                archive_set_error(&a->archive, errno,
-                   "Can't set file flags on symlink.");
+                   "Can't set file flags on symlink");
                return (ARCHIVE_WARN);
        }
        if (chflags(name, a->st.st_flags) == 0)
@@ -4578,7 +4578,7 @@ set_xattrs(struct archive_write_disk *a)
                } else
                        archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
                            "Cannot restore extended "
-                           "attributes on this file system.");
+                           "attributes on this file system");
        }
 
        archive_string_free(&errlist);
@@ -4680,7 +4680,7 @@ set_xattrs(struct archive_write_disk *a)
                } else
                        archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
                            "Cannot restore extended "
-                           "attributes on this file system.");
+                           "attributes on this file system");
        }
 
        archive_string_free(&errlist);
index d7fa5eb6c0fc3656da03d4e63948691ef494b971..b3e5b95f06d4b308a72def79e6034971a20f138b 100644 (file)
@@ -37,7 +37,7 @@ DEFINE_TEST(test_warn_missing_hardlink_target)
 
        assertEqualInt(ARCHIVE_FAILED, archive_write_header(a, ae));
        assertEqualInt(ENOENT, archive_errno(a));
-       assertEqualString("Hard-link target 'hardlink-target' does not exist.",
+       assertEqualString("Hard-link target 'hardlink-target' does not exist",
            archive_error_string(a));
 
        archive_entry_free(ae);