Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
3rd
lib3mf
Commits
f4d873e5
Commit
f4d873e5
authored
7 years ago
by
Martin Weismann
Committed by
Martin Weismann
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Inconsistent ZIP files cause warnings
parent
08afd9cc
master
JavaBindings
ListOfProducts
archersim/master
develop
develop_v1_legacy
draftBinaryToolpath
draftGeometryCompression
fastfloat
fuzzitdev-fuzzit_integration
implicit
issue_273_enable_cek_setup
lib3mf-v2-develop
maintenance
release/2.0.0
release/2.0.1
release/2.1.0
release/2.1.0-alpha
release/2.1.0-beta
release/2.1.1
release/2.2.0
secureContentAPIvo
toolpath_new
trianglesets
updateLibZip
v2AutoFormat
volumetric
v2.2.0
v2.1.1
v2.1.0
v2.1.0-beta
v2.1.0-alpha
v2.0.1
v2.0.0
v2.0.0-beta
v2.0.0-alpha
v1.8.1
v1.8.0-alpha
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+1
-1
CMakeLists.txt
Include/Common/NMR_ErrorConst.h
+3
-0
Include/Common/NMR_ErrorConst.h
Source/Common/NMR_Exception.cpp
+1
-0
Source/Common/NMR_Exception.cpp
Source/Common/OPC/NMR_OpcPackageReader.cpp
+7
-2
Source/Common/OPC/NMR_OpcPackageReader.cpp
with
12 additions
and
3 deletions
+12
-3
CMakeLists.txt
View file @
f4d873e5
...
...
@@ -9,7 +9,7 @@ project (lib3MF)
# Define Version
set
(
LIB3MF_VERSION_MAJOR 1
)
# increase on every backward-compatibility breaking change of the API
set
(
LIB3MF_VERSION_MINOR 4
)
# increase on every backward compatible change of the API
set
(
LIB3MF_VERSION_MICRO
3
)
# increase on on every change that does not alter the API
set
(
LIB3MF_VERSION_MICRO
4
)
# increase on on every change that does not alter the API
set
(
CMAKE_INSTALL_BINDIR bin CACHE PATH
"directory for installing binary files"
)
set
(
CMAKE_INSTALL_LIBDIR lib CACHE PATH
"directory for installing library files"
)
...
...
This diff is collapsed.
Click to expand it.
Include/Common/NMR_ErrorConst.h
View file @
f4d873e5
...
...
@@ -281,6 +281,9 @@ NMR_ErrorConst.h defines all error code constants.
// Error in zip-callback
#define NMR_ERROR_ZIPCALLBACK 0x104C
// ZIP contains inconsistencies
#define NMR_ERROR_ZIPCONTAINSINCONSISTENCIES 0x104D
/*-------------------------------------------------------------------
Core framework error codes (0x2XXX)
-------------------------------------------------------------------*/
...
...
This diff is collapsed.
Click to expand it.
Source/Common/NMR_Exception.cpp
View file @
f4d873e5
...
...
@@ -125,6 +125,7 @@ namespace NMR {
case
NMR_ERROR_ZIPENTRYNON64_TOOLARGE
:
return
"A ZIP Entry is too large for non zip64 zip-file"
;
case
NMR_ERROR_ATTACHMENTTOOLARGE
:
return
"An individual custom attachment is too large."
;
case
NMR_ERROR_ZIPCALLBACK
:
return
"Error in libzip callback."
;
case
NMR_ERROR_ZIPCONTAINSINCONSISTENCIES
:
return
"ZIP file contains inconsistencies. It might load with errors or incorrectly."
;
// Unhandled exception
...
...
This diff is collapsed.
Click to expand it.
Source/Common/OPC/NMR_OpcPackageReader.cpp
View file @
f4d873e5
...
...
@@ -143,8 +143,13 @@ namespace NMR {
throw
CNMRException
(
NMR_ERROR_COULDNOTREADZIPFILE
);
m_ZIParchive
=
zip_open_from_source
(
m_ZIPsource
,
ZIP_RDONLY
|
ZIP_CHECKCONS
,
&
m_ZIPError
);
if
(
m_ZIParchive
==
nullptr
)
throw
CNMRException
(
NMR_ERROR_COULDNOTREADZIPFILE
);
if
(
m_ZIParchive
==
nullptr
)
{
m_ZIParchive
=
zip_open_from_source
(
m_ZIPsource
,
ZIP_RDONLY
,
&
m_ZIPError
);
if
(
m_ZIParchive
==
nullptr
)
throw
CNMRException
(
NMR_ERROR_COULDNOTREADZIPFILE
);
else
m_pWarnings
->
addException
(
CNMRException
(
NMR_ERROR_ZIPCONTAINSINCONSISTENCIES
),
mrwInvalidMandatoryValue
);
}
// Get ZIP Content
nfInt64
nEntryCount
=
zip_get_num_entries
(
m_ZIParchive
,
ZIP_FL_UNCHANGED
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help