Skip to content

Commit

Permalink
Fix to archive file with no extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Oct 9, 2024
1 parent 28b1bda commit 6305a18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tesseract_common/include/tesseract_common/serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct Serialization
{
fs::path fp(file_path);
if (!fp.has_extension())
fp.append(".").append(serialization::xml::extension<SerializableType>::value);
fp = fs::path(file_path + "." + serialization::xml::extension<SerializableType>::value);

std::ofstream os(fp.string());
{ // Must be scoped because all data is not written until the oost::archive::xml_oarchive goes out of scope
Expand All @@ -138,7 +138,7 @@ struct Serialization
{
fs::path fp(file_path);
if (!fp.has_extension())
fp.append(".").append(serialization::binary::extension<SerializableType>::value);
fp = fs::path(file_path + "." + serialization::binary::extension<SerializableType>::value);

std::ofstream os(fp.string(), std::ios_base::binary);
{ // Must be scoped because all data is not written until the oost::archive::xml_oarchive goes out of scope
Expand Down

0 comments on commit 6305a18

Please sign in to comment.