Skip to content
Permalink
Browse files

Don't write outputfile when outputfile is same as inputfile

  • Loading branch information...
xoltar committed Feb 28, 2019
1 parent 06d3541 commit f13127de7cc92997db3ce6358b913e8bdbe054d4
Showing with 2 additions and 2 deletions.
  1. +2 −2 console.cpp
@@ -380,7 +380,7 @@ int main(int argc, char* argv[])
print_betti(message, std::cout);

//if an output file has been specified, then save the Betti numbers in an arrangement file (with no barcode templates)
if (!params.outputFile.empty()) {
if (!params.outputFile.empty() && !(params.outputFile == params.fileName)) {
std::ofstream file(params.outputFile);
if (file.is_open()) {
std::vector<exact> emptyvec;
@@ -454,7 +454,7 @@ int main(int argc, char* argv[])

}
//if an output file has been specified, then save the arrangement
if (!params.outputFile.empty()) {
if (!params.outputFile.empty() && !(params.fileName == params.outputFile)) {
std::ofstream file(params.outputFile);
if (file.is_open()) {
if (arrangement == nullptr) {

0 comments on commit f13127d

Please sign in to comment.
You can’t perform that action at this time.