*
*/
+#include <boost/algorithm/string/replace.hpp>
+
#include "libradosstriper/RadosStriperImpl.h"
#include <errno.h>
// get list of extents to be read from
vector<ObjectExtent> *extents = new vector<ObjectExtent>();
if (read_len > 0) {
- std::string format = soid + RADOS_OBJECT_EXTENSION_FORMAT;
+ std::string format = soid;
+ boost::replace_all(format, "%", "%%");
+ format += RADOS_OBJECT_EXTENSION_FORMAT;
file_layout_t l;
l.from_legacy(layout);
Striper::file_to_extents(cct(), format.c_str(), &l, off, read_len,
if (len > 0) {
// get list of extents to be written to
vector<ObjectExtent> extents;
- std::string format = soid + RADOS_OBJECT_EXTENSION_FORMAT;
+ std::string format = soid;
+ boost::replace_all(format, "%", "%%");
+ format += RADOS_OBJECT_EXTENSION_FORMAT;
file_layout_t l;
l.from_legacy(layout);
Striper::file_to_extents(cct(), format.c_str(), &l, off, len, 0, extents);