Skip to content

Commit

Permalink
Fix of Cmd line output does not always show correct output file name #…
Browse files Browse the repository at this point in the history
  • Loading branch information
bubnikv committed Oct 15, 2020
1 parent 263759a commit cc7eaef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/PrusaSlicer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,12 @@ int CLI::run(int argc, char **argv)
outfile_final = sla_print.print_statistics().finalize_output_path(outfile);
sla_archive.export_print(outfile_final, sla_print);
}
if (outfile != outfile_final && Slic3r::rename_file(outfile, outfile_final)) {
boost::nowide::cerr << "Renaming file " << outfile << " to " << outfile_final << " failed" << std::endl;
return 1;
if (outfile != outfile_final) {
if (Slic3r::rename_file(outfile, outfile_final)) {
boost::nowide::cerr << "Renaming file " << outfile << " to " << outfile_final << " failed" << std::endl;
return 1;
}
outfile = outfile_final;
}
boost::nowide::cout << "Slicing result exported to " << outfile << std::endl;
} catch (const std::exception &ex) {
Expand Down

0 comments on commit cc7eaef

Please sign in to comment.