If we call
bl.append(some_istream);
do not include a \n if the istream is empty (which is apparently is not
the same thing as eof). This was causing 'ceph pg getmap' to include a
trailing newline.
Probably we don't want this newline at all! But all callers need to be
fixed for that change.
Signed-off-by: Sage Weil <sage@inktank.com>
std::string s;
getline(in, s);
append(s.c_str(), s.length());
- append("\n", 1);
+ if (s.length())
+ append("\n", 1);
}
}