34
34
35
35
#include " logging.hpp"
36
36
37
+ namespace fs = rcpputils::fs;
38
+
37
39
namespace rosbag2_compression
38
40
{
39
41
@@ -75,13 +77,8 @@ void SequentialCompressionWriter::compression_thread_fn()
75
77
rcpputils::check_true (compressor != nullptr , " Could not create compressor." );
76
78
77
79
while (true ) {
78
- <<<<<<< HEAD
79
80
std::shared_ptr<rosbag2_storage::SerializedBagMessage> message;
80
- std::string file;
81
- =======
82
- std::shared_ptr<const rosbag2_storage::SerializedBagMessage> message;
83
81
std::string closed_file_relative_to_bag;
84
- >>>>>>> 1877b538 (Bugfix for bag_split event callbacks called to early with file compression (#1643 ))
85
82
{
86
83
std::unique_lock<std::mutex> lock (compressor_queue_mutex_);
87
84
compressor_condition_.wait (
@@ -120,7 +117,7 @@ void SequentialCompressionWriter::compression_thread_fn()
120
117
// Execute callbacks from the base class
121
118
static const std::string compressor_ext = " ." + compressor->get_compression_identifier ();
122
119
auto closed_file =
123
- (fs::path (base_folder_) / (closed_file_relative_to_bag + compressor_ext)).generic_string ();
120
+ (fs::path (base_folder_) / (closed_file_relative_to_bag + compressor_ext)).string ();
124
121
std::string new_file;
125
122
// To determine, a new_file we can't rely on the metadata_.relative_file_paths.back(),
126
123
// because other compressor threads may have already pushed a new item above.
@@ -132,7 +129,7 @@ void SequentialCompressionWriter::compression_thread_fn()
132
129
if (iter != metadata_.relative_file_paths .end ()) {
133
130
++iter;
134
131
if (iter != metadata_.relative_file_paths .end ()) {
135
- new_file = (fs::path (base_folder_) / *iter).generic_string ();
132
+ new_file = (fs::path (base_folder_) / *iter).string ();
136
133
}
137
134
}
138
135
}
@@ -333,7 +330,7 @@ void SequentialCompressionWriter::split_bagfile()
333
330
compressor_file_queue_.push (last_file_relative_to_bag);
334
331
compressor_condition_.notify_one ();
335
332
} else {
336
- auto last_file = (fs::path (base_folder_) / last_file_relative_to_bag).generic_string ();
333
+ auto last_file = (fs::path (base_folder_) / last_file_relative_to_bag).string ();
337
334
SequentialWriter::execute_bag_split_callbacks (last_file, new_file);
338
335
}
339
336
0 commit comments