diff --git a/xs/src/libslic3r/Format/AMF.cpp b/xs/src/libslic3r/Format/AMF.cpp index 06ba20120..a52dd532a 100644 --- a/xs/src/libslic3r/Format/AMF.cpp +++ b/xs/src/libslic3r/Format/AMF.cpp @@ -576,8 +576,8 @@ bool load_amf_archive(const char *path, PresetBundle* bundle, Model *model) return false; } - std::string internal_aml_filename = boost::ireplace_last_copy(boost::filesystem::path(path).filename().string(), ".zip.amf", ".amf"); - if (internal_aml_filename != stat.m_filename) + std::string internal_amf_filename = boost::ireplace_last_copy(boost::filesystem::path(path).filename().string(), ".zip.amf", ".amf"); + if (internal_amf_filename != stat.m_filename) { printf("Found invalid internal filename\n"); mz_zip_reader_end(&archive); @@ -606,7 +606,7 @@ bool load_amf_archive(const char *path, PresetBundle* bundle, Model *model) void* parser_buffer = XML_GetBuffer(parser, (int)stat.m_uncomp_size); if (parser_buffer == nullptr) { - printf("Unable to create buffer"); + printf("Unable to create buffer\n"); mz_zip_reader_end(&archive); return false; } @@ -614,14 +614,14 @@ bool load_amf_archive(const char *path, PresetBundle* bundle, Model *model) res = mz_zip_reader_extract_file_to_mem(&archive, stat.m_filename, parser_buffer, (size_t)stat.m_uncomp_size, 0); if (res == 0) { - printf("Error while reading model data to buffer"); + printf("Error while reading model data to buffer\n"); mz_zip_reader_end(&archive); return false; } if (!XML_ParseBuffer(parser, (int)stat.m_uncomp_size, 1)) { - printf("Error (%s) while parsing xml file at line %d", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser)); + printf("Error (%s) while parsing xml file at line %d\n", XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser)); mz_zip_reader_end(&archive); return false; } @@ -767,10 +767,10 @@ bool store_amf(const char *path, Model *model, Print* print) } stream << "\n"; - std::string internal_aml_filename = boost::ireplace_last_copy(boost::filesystem::path(path).filename().string(), ".zip.amf", ".amf"); + std::string internal_amf_filename = boost::ireplace_last_copy(boost::filesystem::path(path).filename().string(), ".zip.amf", ".amf"); std::string out = stream.str(); - if (!mz_zip_writer_add_mem(&archive, internal_aml_filename.c_str(), (const void*)out.data(), out.length(), MZ_DEFAULT_COMPRESSION)) + if (!mz_zip_writer_add_mem(&archive, internal_amf_filename.c_str(), (const void*)out.data(), out.length(), MZ_DEFAULT_COMPRESSION)) { mz_zip_writer_end(&archive); boost::filesystem::remove(path);