mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-09 17:25:18 -06:00
tar: fix save_header regression
This commit is contained in:
parent
5758ab11f7
commit
a8559a526a
@ -568,8 +568,9 @@ void tar_object::save_directory(const std::string& target_path, utils::serial& a
|
||||
auto save_header = [&](const fs::stat_t& stat, std::string_view name)
|
||||
{
|
||||
static_assert(sizeof(TARHeader) == 512);
|
||||
ensure(src_dir_pos <= name.size());
|
||||
|
||||
std::string_view saved_path = name.size() == src_dir_pos ? name : name.substr(src_dir_pos);
|
||||
std::string_view saved_path = name.size() == src_dir_pos ? std::string_view() : name.substr(src_dir_pos);
|
||||
|
||||
if (is_null)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user