summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-13 01:32:56 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-13 01:32:56 -0500
commitb4861811d406318b26773523a0bf34119bc309e1 (patch)
tree4ef2ee61ef2c9034aab6bc5e5e64629e9b292ffd
parent723a7a870d786ce8fce64bc3dfc91b064b225c5d (diff)
downloadhorizon-b4861811d406318b26773523a0bf34119bc309e1.tar.gz
horizon-b4861811d406318b26773523a0bf34119bc309e1.tar.bz2
horizon-b4861811d406318b26773523a0bf34119bc309e1.tar.xz
horizon-b4861811d406318b26773523a0bf34119bc309e1.zip
image: TAR: Force UTF-8 pathnames always
-rw-r--r--image/backends/tar.cc6
1 files changed, 3 insertions, 3 deletions
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;