cmArchiveWrite: Comment how we pass an entry pathname to libarchive

Follow up commit ae93a9dd2d (cmSystemTools: Avoid allocation in archive
entry pathname wrappers, 2026-02-01).
This commit is contained in:
Brad King
2026-02-04 13:53:03 -05:00
committed by Alex Overchenko
parent 95040f37ed
commit e07d0dacc9

View File

@@ -43,6 +43,10 @@ static void cm_archive_entry_copy_pathname(struct archive_entry* e,
{
#ifdef _WIN32
// libarchive converts our UTF-8 encoding to the archive's encoding.
// `archive_entry_update_pathname_utf8` always populates the WCS form too.
// It also populates the MBS form if possible, but we ignore conversion
// failure because the archive formats support converting directly from
// the WCS form to the archive's encoding without using the MBS form.
archive_entry_update_pathname_utf8(e, dest);
#else
// libarchive converts our locale's encoding to the archive's encoding.