Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Onur Rauf Bingol committed Apr 18, 2019
1 parent 80c4f11 commit ffd718e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/on2json/on2json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,17 @@ std::string on2json_run(std::string &fileName, Config &cfg)
fnameSave = fileName.substr(0, fileName.find_last_of(".")) + ".json";
std::ofstream fileSave(fnameSave.c_str(), std::ios::out);
if (!fileSave)
{
// Save JSON string to the file
fileSave << jsonString << std::endl;
fileSave.close();
}
else
{
if (!cfg.silent())
std::cout << "[ERROR] Cannot open file '" << fnameSave << "' for writing!" << std::endl;
fnameSave.clear();
}
else
{
// Save JSON string to the file
fileSave << jsonString << std::endl;
fileSave.close();
}
}

return fnameSave;
Expand Down

0 comments on commit ffd718e

Please sign in to comment.