Skip to content

Commit

Permalink
Fixed issues #68 #69 and #70
Browse files Browse the repository at this point in the history
  • Loading branch information
ironfede committed Sep 17, 2020
1 parent 04b53dc commit 949e5ce
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 24 deletions.
2 changes: 1 addition & 1 deletion sources/OpenMcdf.Extensions/OpenMcdf.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Version>2.2.1.5</Version>
<Version>2.2.1.7</Version>
<PackageLicenseUrl>https://opensource.org/licenses/MPL-2.0</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/ironfede/openmcdf</PackageProjectUrl>
<PackageIconUrl>http://a.fsdn.com/allura/p/openmcdf/icon</PackageIconUrl>
Expand Down
22 changes: 4 additions & 18 deletions sources/OpenMcdf/DirectoryEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,9 @@ private DirectoryEntry(String name, StgType stgType, IList<IDirectoryEntry> dirR

this.stgType = stgType;

switch (stgType)
if (stgType == StgType.StgStorage)
{
case StgType.StgStream:

this.storageCLSID = new Guid("00000000000000000000000000000000");
this.creationDate = new byte[8] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
this.modifyDate = new byte[8] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
break;

case StgType.StgStorage:
this.creationDate = BitConverter.GetBytes((DateTime.Now.ToFileTime()));
break;

case StgType.StgRoot:
this.creationDate = new byte[8] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
this.modifyDate = new byte[8] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
break;
this.creationDate = BitConverter.GetBytes((DateTime.Now.ToFileTime()));
}

this.SetEntryName(name);
Expand Down Expand Up @@ -110,7 +96,7 @@ public void SetEntryName(String entryName)
throw new CFException("Invalid character in entry: the characters '\\', '/', ':','!' cannot be used in entry name");

if (entryName.Length > 31)
throw new CFException("Entry name MUST be smaller than 31 characters");
throw new CFException("Entry name MUST NOT exceed 31 characters");



Expand Down Expand Up @@ -187,7 +173,7 @@ public Int32 Child
}

private Guid storageCLSID
= Guid.NewGuid();
= Guid.Empty;

public Guid StorageCLSID
{
Expand Down
4 changes: 2 additions & 2 deletions sources/OpenMcdf/OpenMcdf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>2.2.1.5</ApplicationVersion>
<ApplicationVersion>2.2.1.7</ApplicationVersion>
<IsWebBootstrapper>true</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
Expand All @@ -78,7 +78,7 @@
</PropertyGroup>
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>2.2.1.5</Version>
<Version>2.2.1.7</Version>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>ironfede</Authors>
<PackageLicenseUrl>https://opensource.org/licenses/MPL-2.0</PackageLicenseUrl>
Expand Down
2 changes: 1 addition & 1 deletion sources/OpenMcdf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.1.5")]
[assembly: AssemblyVersion("2.2.1.7")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("OpenMcdf.Tests,PublicKey=002400000480000094000000060200000024000052534131000400000100010085b50cbc1e40df696f8c30eaafc59a01e22303cb038fc832289b2c393f908a65c9aaa0d28026a47c6e5f85cc236f0735bea17236dbaaf91fea0003ddc1bb9c4cd318c5b855e7ef5877df5a7fc8394ee747d3573b69622e045837d546befb2fc13257e984db53a73dd59254a9a1d3c99a8ca6876c91304ea96899ac06a88d7bc6")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("OpenMcdf.Test,PublicKey=002400000480000094000000060200000024000052534131000400000100010085b50cbc1e40df696f8c30eaafc59a01e22303cb038fc832289b2c393f908a65c9aaa0d28026a47c6e5f85cc236f0735bea17236dbaaf91fea0003ddc1bb9c4cd318c5b855e7ef5877df5a7fc8394ee747d3573b69622e045837d546befb2fc13257e984db53a73dd59254a9a1d3c99a8ca6876c91304ea96899ac06a88d7bc6")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("OpenMcdf.Extensions,PublicKey=002400000480000094000000060200000024000052534131000400000100010085b50cbc1e40df696f8c30eaafc59a01e22303cb038fc832289b2c393f908a65c9aaa0d28026a47c6e5f85cc236f0735bea17236dbaaf91fea0003ddc1bb9c4cd318c5b855e7ef5877df5a7fc8394ee747d3573b69622e045837d546befb2fc13257e984db53a73dd59254a9a1d3c99a8ca6876c91304ea96899ac06a88d7bc6")]
4 changes: 2 additions & 2 deletions sources/Test/OpenMcdf.Test/CompoundFileTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ public void Test_FIX_BUG_GH_14()
String storageName = "MyStorage";
String streamName = "MyStream";
int BUFFER_SIZE = 800 * Mb;
int iterationCount = 3;
int iterationCount = 1;
int streamCount = 3;

CompoundFile compoundFileInit = new CompoundFile(CFSVersion.Ver_4, CFSConfiguration.Default);
Expand Down Expand Up @@ -964,7 +964,7 @@ public void Test_FIX_BUG_GH_15()
String storageName = "MyStorage";
String streamName = "MyStream";
int BUFFER_SIZE = 800 * Mb;
int iterationCount = 6;
int iterationCount = 1;
int streamCount = 1;

CompoundFile compoundFile = new CompoundFile(CFSVersion.Ver_4, CFSConfiguration.Default);
Expand Down

0 comments on commit 949e5ce

Please sign in to comment.