From 2693255a798b6b6aa4680302c846873106c544d1 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 10 Feb 2025 02:04:56 -0600 Subject: [PATCH] Small path correction --- cpp/tar_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/tar_common.cpp b/cpp/tar_common.cpp index 552c980..a391652 100644 --- a/cpp/tar_common.cpp +++ b/cpp/tar_common.cpp @@ -85,7 +85,7 @@ void create_tarball(const std::string &tarball_path, if (!entry) throw std::runtime_error("Failed to create archive entry for top-level directory."); std::string top_dir = base_dir_str + "/"; struct stat file_stat; - if (stat(top_dir.c_str(), &file_stat) == 0) { + if (stat(base_dir_str.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.c_str());