Ensure that the core properties are there before saving them, in case they have not yet been lazy-created

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1662971 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2015-02-28 17:36:19 +00:00
parent 0e16d14349
commit 3ba7b59afc

View File

@ -444,6 +444,8 @@ public final class ZipPackage extends Package {
this.getPartsByRelationshipType(PackageRelationshipTypes.CORE_PROPERTIES_ECMA376).size() == 0 ) {
logger.log(POILogger.DEBUG,"Save core properties part");
// Ensure that core properties are added if missing
getPackageProperties();
// Add core properties to part list ...
addPackagePart(this.packageProperties);
// ... and to add its relationship ...