From e5cf2ebd61ec6e02626365df82af717d6c6c390b Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 10 Feb 2025 01:28:03 -0600 Subject: [PATCH] std::string -> const char* --- cpp/utilities.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/utilities.cpp b/cpp/utilities.cpp index b44afc5..95e0300 100644 --- a/cpp/utilities.cpp +++ b/cpp/utilities.cpp @@ -459,8 +459,8 @@ void create_tarball(const std::string &tarball_path, if (stat(top_dir.c_str(), &file_stat) == 0) { std::string uname = clean_utf8(getpwuid(file_stat.st_uid) ? getpwuid(file_stat.st_uid)->pw_name : "lugito"); std::string gname = clean_utf8(getgrgid(file_stat.st_gid) ? getgrgid(file_stat.st_gid)->gr_name : "lugito"); - archive_entry_set_uname(entry, uname); - archive_entry_set_gname(entry, gname); + archive_entry_set_uname(entry, uname.c_str()); + archive_entry_set_gname(entry, gname.c_str()); archive_entry_set_uid(entry, file_stat.st_uid); archive_entry_set_gid(entry, file_stat.st_gid); archive_entry_set_perm(entry, file_stat.st_mode); @@ -534,8 +534,8 @@ void create_tarball(const std::string &tarball_path, if (stat(path.c_str(), &file_stat) == 0) { std::string uname = clean_utf8(getpwuid(file_stat.st_uid) ? getpwuid(file_stat.st_uid)->pw_name : "lugito"); std::string gname = clean_utf8(getgrgid(file_stat.st_gid) ? getgrgid(file_stat.st_gid)->gr_name : "lugito"); - archive_entry_set_uname(entry, uname); - archive_entry_set_gname(entry, gname); + archive_entry_set_uname(entry, uname.c_str()); + archive_entry_set_gname(entry, gname.c_str()); archive_entry_set_uid(entry, file_stat.st_uid); archive_entry_set_gid(entry, file_stat.st_gid); archive_entry_set_perm(entry, file_stat.st_mode);