diff --git a/src/v/cloud_storage/recursive_directory_walker.cc b/src/v/cloud_storage/recursive_directory_walker.cc index 37355ad863af9..e6c3cc5f57e14 100644 --- a/src/v/cloud_storage/recursive_directory_walker.cc +++ b/src/v/cloud_storage/recursive_directory_walker.cc @@ -74,7 +74,7 @@ struct walk_accumulator { bool empty() const { return dirlist.empty(); } ss::sstring pop() { - auto r = dirlist.back(); + auto r = std::move(dirlist.back()); dirlist.pop_back(); return r; }