File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ def set_version(self):
39
39
def requirements (self ):
40
40
self .tool_requires ("cmake/[>=3.19]" )
41
41
self .requires ("fmilibrary/[~2.3]" )
42
- self .requires ("libcbor/[~0.11.0 ]" )
43
- self .requires ("libzip/[>=1.7 <1.10 ]" ) # 1.10 deprecates some functions we use
42
+ self .requires ("libcbor/[~0.11]" )
43
+ self .requires ("libzip/[~1.3 ]" )
44
44
self .requires ("ms-gsl/[>=3 <5]" , transitive_headers = True )
45
45
self .requires ("boost/[~1.85]" , transitive_headers = True , transitive_libs = True ) # Required by Thrift
46
46
if self .options .proxyfmu :
Original file line number Diff line number Diff line change @@ -107,11 +107,11 @@ void archive::open(const cosim::filesystem::path& path)
107
107
int errorCode;
108
108
auto archive = zip_open (path.string ().c_str (), 0 , &errorCode);
109
109
if (!archive) {
110
- const auto errnoVal = (errorCode == ZIP_ER_READ ? errno : 0 ) ;
111
- auto msgBuf = std::vector< char >(
112
- zip_error_to_str ( nullptr , 0 , errorCode, errnoVal) + 1 );
113
- zip_error_to_str (msgBuf. data (), msgBuf. size (), errorCode, errno );
114
- throw error (" Unzipping of file: '" + path.string () + " ' failed with error: " + msgBuf. data () );
110
+ zip_error_t zipError ;
111
+ zip_error_init_with_code (&zipError, errorCode);
112
+ std::string errorMsg = zip_error_strerror (&zipError );
113
+ zip_error_fini (&zipError );
114
+ throw error (" Unzipping of file: '" + path.string () + " ' failed with error: " + errorMsg );
115
115
}
116
116
m_archive = archive;
117
117
}
You can’t perform that action at this time.
0 commit comments