Such a path could be created through S3 upload,
e.g., s3://my_files//data/file.pdf.
Previously we asserted for this case, but it's harmless--such a
path segment should just be ignored.
Fixes: http://tracker.ceph.com/issues/38744
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit
a53e6c1d5b785a2a46007292041d0a8cb552e3e6)
Conflicts:
src/rgw/rgw_file.h : Resolved in operator
int operator()(const boost::string_ref name, const rgw_obj_key& marker,
uint8_t type) {
- assert(name.length() > 0); // XXX
+ assert(name.length() > 0); // all cases handled in callers
/* hash offset of name in parent (short name) for NFS readdir cookie */
uint64_t off = XXH64(name.data(), name.length(), fh_key::seed);
<< " cpref=" << sref
<< dendl;
+ if (sref.empty()) {
+ /* null path segment--could be created in S3 but has no NFS
+ * interpretation */
+ return;
+ }
+
this->operator()(sref, next_marker, RGW_FS_TYPE_DIRECTORY);
++ix;
}