SLA export: Finalize filename when exporting & uploading,

set correct project name when uploading
This commit is contained in:
Vojtech Kral 2019-04-04 12:31:09 +02:00
parent 251747e6fa
commit 70ce79c86e
2 changed files with 9 additions and 7 deletions

View file

@ -397,8 +397,9 @@ int CLI::run(int argc, char **argv)
outfile_final = fff_print.print_statistics().finalize_output_path(outfile);
} else {
outfile = sla_print.output_filepath(outfile);
sla_print.export_raster(outfile);
outfile_final = sla_print.print_statistics().finalize_output_path(outfile);
// We need to finalize the filename beforehand because the export function sets the filename inside the zip metadata
outfile_final = sla_print.print_statistics().finalize_output_path(outfile);
sla_print.export_raster(outfile_final);
}
if (outfile != outfile_final && Slic3r::rename_file(outfile, outfile_final) != 0) {
boost::nowide::cerr << "Renaming file " << outfile << " to " << outfile_final << " failed" << std::endl;