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);