Skip to content
Snippets Groups Projects
Commit 9717cd14 authored by Eric Cano's avatar Eric Cano
Browse files

Added protection against creation of empty objects.

parent e0bd4bc4
No related branches found
No related tags found
No related merge requests found
......@@ -183,6 +183,7 @@ librados::IoCtx& BackendRados::getRadosCtx() {
}
void BackendRados::create(std::string name, std::string content) {
if (content.empty()) throw exception::Exception("In BackendRados::create: trying to create an empty object.");
librados::ObjectWriteOperation wop;
const bool createExclusive = true;
wop.create(createExclusive);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment