Skip to content

ZipPackage internal constructor checks hasContentTypeXml twice #2089

@Reiqy

Description

@Reiqy

EPPlus usage

Personal use

Environment

Windows

Epplus version

8.1.0

Spreadsheet application

No response

Description

Hi,

This is probably not even a bug, but while diagnosing some unrelated issue I noticed that the code in ZipPackage.cs checks !hasContentTypeXml twice in a row.

See:

if (!hasContentTypeXml)
{
throw (new InvalidDataException("The file is not a valid Package file. If the file is encrypted, please supply the password in the constructor."));
}
if (!hasContentTypeXml)
{
throw (new InvalidDataException("The file is not a valid Package file. If the file is encrypted, please supply the password in the constructor."));
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Pending Release

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions