if (isPersisted()) {
std::ofstream ofs;
try {
- ofs.open(storage_location_, std::ofstream::out |
+ ofs.open(storage_location_.c_str(), std::ofstream::out |
std::ofstream::trunc);
if (!ofs.good()) {
isc_throw(InvalidOperation, "unable to open DUID file "
std::ostringstream duid_str;
if (isPersisted()) {
std::ifstream ifs;
- ifs.open(storage_location_, std::ifstream::in);
+ ifs.open(storage_location_.c_str(), std::ifstream::in);
if (ifs.good()) {
std::string read_contents;
while (!ifs.eof() && ifs.good()) {
std::string
DUIDFactoryTest::readDefaultFile() const {
std::ifstream ifs;
- ifs.open(absolutePath(DEFAULT_DUID_FILE), std::ifstream::in);
+ ifs.open(absolutePath(DEFAULT_DUID_FILE).c_str(), std::ifstream::in);
if (!ifs.good()) {
return (std::string());
}