diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-02-14 17:52:39 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-02-14 17:52:39 +0300 |
commit | dcc667cdc7e051c71952565739527c34c07ee06a (patch) | |
tree | 0ffa6d90e3daede4e4babd9b6a7dd605c5336e68 /xs/src/libslic3r/Format | |
parent | f5f27859e026876de2501f11219f29702483b20f (diff) |
AMF I/O - Fixed error messages
Diffstat (limited to 'xs/src/libslic3r/Format')
-rw-r--r-- | xs/src/libslic3r/Format/AMF.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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 << "</amf>\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); |