Skip to content

Commit 74bb7fd

Browse files
authored
Merge pull request #15756 from 1012327963/fix-path-loc
Fix non-sequential reading of path_loc.
2 parents 89a633d + e8aa8a1 commit 74bb7fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/external_command/external_command_demo/external_command_demo.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ void ExternalCommandDemo::SendPathFollowCommandWithLocationRecord(
302302
std::make_shared<apollo::external_command::PathFollowCommand>();
303303
std::vector<std::string> record_files =
304304
apollo::cyber::common::ListSubPaths(record_dir, DT_REG);
305+
std::sort(record_files.begin(), record_files.end()); // Sort file names.
305306
std::string dir_prefix = record_dir + '/';
306307
for (const auto file_name : record_files) {
307308
ReadPathFromLocationRecord(dir_prefix + file_name,

0 commit comments

Comments
 (0)