Skip to content

fix(UnZipFile): Added fallback to previous method when dealing with b… - #1308

Merged
BotellaA merged 1 commit into
nextfrom
fix/unzip_big_file_fallback
Jul 22, 2026
Merged

fix(UnZipFile): Added fallback to previous method when dealing with b…#1308
BotellaA merged 1 commit into
nextfrom
fix/unzip_big_file_fallback

Conversation

@MelchiorSchuh

Copy link
Copy Markdown
Member

…ug files which cannot be openned in memory

@github-actions

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 15 concern(s)
  • src/geode/basic/zip_file.cpp:30:10: error: [clang-diagnostic-error]

    'mz.h' file not found

       30 | #include <mz.h>
          |          ^~~~~~
  • src/geode/basic/zip_file.cpp:42:9: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'create_directory' of similar type ('std::string_view') are easily swapped by mistake

       42 |         std::string_view file, std::string_view temp_filename )
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:42:26: note: the first parameter in the range is 'file'
       42 |         std::string_view file, std::string_view temp_filename )
          |                          ^~~~
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:42:49: note: the last parameter in the range is 'temp_filename'
       42 |         std::string_view file, std::string_view temp_filename )
          |                                                 ^~~~~~~~~~~~~
  • src/geode/basic/zip_file.cpp:54:20: warning: [cppcoreguidelines-special-member-functions]

    class 'Impl' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator

       54 |     class ZipFile::Impl
          |                    ^
  • src/geode/basic/zip_file.cpp:60:13: warning: [cppcoreguidelines-prefer-member-initializer]

    'writer_' should be initialized in a member initializer of the constructor

       57 |         Impl( std::string_view file, std::string_view archive_temp_filename )
          |                                                                              
          |                                                                               : writer_(mz_zip_writer_create())
       58 |         {
       59 |             directory_ = create_directory( file, archive_temp_filename );
       60 |             writer_ = mz_zip_writer_create();
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/basic/zip_file.cpp:75:17: warning: [readability-implicit-bool-conversion]

    implicit conversion 'void *' -> 'bool'

       75 |             if( writer_ )
          |                 ^
          |                         != nullptr
  • src/geode/basic/zip_file.cpp:106:9: warning: [modernize-use-nodiscard]

    function 'directory' should be marked [[nodiscard]]

      106 |         std::string directory() const
          |         ^
          |         [[nodiscard]] 
  • src/geode/basic/zip_file.cpp:140:22: warning: [cppcoreguidelines-special-member-functions]

    class 'Impl' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator

      140 |     class UnzipFile::Impl
          |                      ^
  • src/geode/basic/zip_file.cpp:143:9: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: zip_data_

      143 |         Impl( std::string_view file, std::string_view unarchive_temp_filename )
          |         ^
  • src/geode/basic/zip_file.cpp:164:17: warning: [readability-implicit-bool-conversion]

    implicit conversion 'void *' -> 'bool'

      164 |             if( reader_ )
          |                 ^
          |                         != nullptr
  • src/geode/basic/zip_file.cpp:170:17: warning: [readability-implicit-bool-conversion]

    implicit conversion 'void *' -> 'bool'

      170 |             if( memory_stream_ )
          |                 ^
          |                                != nullptr
  • src/geode/basic/zip_file.cpp:181:41: warning: [bugprone-implicit-widening-of-multiplication-result]

    performing an implicit widening conversion to type 'const size_t' (aka 'const unsigned long') of a multiplication performed in type 'int'

      181 |             constexpr size_t BUF_SIZE = 1024 * 1024; // 1 MB
          |                                         ^
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:181:41: note: make conversion explicit to silence this warning
       24 |             constexpr size_t BUF_SIZE = 1024 * 1024; // 1 MB
          |                                         ^~~~~~~~~~~
          |                                         static_cast<const size_t>( )
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:181:41: note: perform multiplication in a wider type
      181 |             constexpr size_t BUF_SIZE = 1024 * 1024; // 1 MB
          |                                         ^~~~
          |                                         static_cast<long>( )
  • src/geode/basic/zip_file.cpp:196:22: warning: [readability-implicit-bool-conversion]

    implicit conversion 'FILE *' (aka '_IO_FILE *') -> 'bool'

      196 |                 if( !file )
          |                     ~^
          |                           == nullptr
  • src/geode/basic/zip_file.cpp:213:17: warning: [cert-err33-c]

    the value returned by this function should not be disregarded; neglecting it may lead to errors

      213 |                 fclose( file );
          |                 ^~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:213:17: note: cast the expression to void to silence this warning
  • src/geode/basic/zip_file.cpp:213:17: warning: [cppcoreguidelines-owning-memory]

    calling legacy resource function without passing a 'gsl::owner<>'

      213 |                 fclose( file );
          |                 ^~~~~~~~~~~~~~
  • src/geode/basic/zip_file.cpp:218:9: warning: [modernize-use-nodiscard]

    function 'directory' should be marked [[nodiscard]]

      218 |         std::string directory() const
          |         ^
          |         [[nodiscard]] 

Have any feedback or feature suggestions? Share it here.

@BotellaA
BotellaA merged commit 0b4a250 into next Jul 22, 2026
24 checks passed
@BotellaA
BotellaA deleted the fix/unzip_big_file_fallback branch July 22, 2026 11:49
@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 17.4.4-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 17.4.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants