From ebcce9ae0aec8089c8c2e76d0ae799179d9f4b68 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 28 May 2021 15:41:21 -0700 Subject: [PATCH] Handle directory entries in Archive Project ZIP archives may have entries that are only directories. We should not try to extract this entries (they have no length); instead, we merely create the path and continue --- common/project/project_archiver.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/project/project_archiver.cpp b/common/project/project_archiver.cpp index a84246d2bd..9702978f37 100644 --- a/common/project/project_archiver.cpp +++ b/common/project/project_archiver.cpp @@ -139,6 +139,10 @@ bool PROJECT_ARCHIVER::Unarchive( const wxString& aSrcFile, const wxString& aDes } } + // Directory entries need only be created, not extracted (0 size) + if( entry->IsDir() ) + continue; + wxTempFileOutputStream outputFileStream( fullname ); if( CopyStreamData( *archiveStream, outputFileStream, entry->GetSize() ) )