From b4861811d406318b26773523a0bf34119bc309e1 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 13 May 2020 01:32:56 -0500 Subject: image: TAR: Force UTF-8 pathnames always --- image/backends/tar.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'image') diff --git a/image/backends/tar.cc b/image/backends/tar.cc index 7ca9f75..279a11c 100644 --- a/image/backends/tar.cc +++ b/image/backends/tar.cc @@ -98,10 +98,10 @@ public: if(dent.is_symlink()) { archive_entry_set_filetype(entry, AE_IFLNK); fs::path resolved = fs::read_symlink(dent.path(), ec); - const fs::path::value_type *c_rpath = resolved.c_str(); - archive_entry_set_symlink(entry, c_rpath); + const fs::path::value_type *c_rpath = resolved.u8string().c_str(); + archive_entry_update_symlink_utf8(entry, c_rpath); } - archive_entry_set_pathname(entry, relpath.c_str()); + archive_entry_update_pathname_utf8(entry, relpath.u8string().c_str()); if(archive_write_header(this->a, entry) != ARCHIVE_OK) { output_error("tar backend", archive_error_string(a)); code = -1; -- cgit v1.2.3-70-g09d2