Skip to content

Commit cbd1bd1

Browse files
committed
Fixed #404.
1 parent ab12ab7 commit cbd1bd1

File tree

6 files changed

+44
-14
lines changed

6 files changed

+44
-14
lines changed

AutoUpdater.NET/AutoUpdater.NET.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
<Company>RBSoft</Company>
1111
<Product>AutoUpdater.NET</Product>
1212
<Copyright>Copyright © 2012-2020 RBSoft</Copyright>
13-
<AssemblyVersion>1.6.1.0</AssemblyVersion>
14-
<FileVersion>1.6.1.0</FileVersion>
13+
<AssemblyVersion>1.6.2.0</AssemblyVersion>
14+
<FileVersion>1.6.2.0</FileVersion>
1515
<SignAssembly>true</SignAssembly>
1616
<AssemblyOriginatorKeyFile>AutoUpdater.NET.snk</AssemblyOriginatorKeyFile>
1717
<NeutralLanguage>en</NeutralLanguage>
1818
<PackageId>Autoupdater.NET.Official</PackageId>
1919
<IncludeSymbols>true</IncludeSymbols>
2020
<PackageLicenseExpression>MIT</PackageLicenseExpression>
21-
<PackageVersion>1.6.1</PackageVersion>
21+
<PackageVersion>1.6.2</PackageVersion>
2222
<Title>AutoUpdater.NET</Title>
2323
<Authors>rbsoft</Authors>
2424
<Description>AutoUpdater.NET is a class library that allows .NET developers to easily add auto update functionality to their classic desktop application projects.</Description>
0 Bytes
Binary file not shown.

ZipExtractor/ExtensionMethods.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#if NET45
2+
using System.IO.Compression;
3+
#endif
4+
5+
namespace ZipExtractor
6+
{
7+
public static class ExtensionMethod
8+
{
9+
#if NET45
10+
public static bool IsDirectory(this ZipArchiveEntry entry)
11+
{
12+
return string.IsNullOrEmpty(entry.Name) && (entry.FullName.EndsWith("/") || entry.FullName.EndsWith(@"\"));
13+
}
14+
#endif
15+
}
16+
}

ZipExtractor/FormMain.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,15 @@ private void FormMain_Shown(object sender, EventArgs e)
122122
{
123123
#if NET45
124124
filePath = Path.Combine(path, entry.FullName);
125-
entry.ExtractToFile(filePath, true);
125+
if (!entry.IsDirectory())
126+
{
127+
var parentDirectory = Path.GetDirectoryName(filePath);
128+
if (!Directory.Exists(parentDirectory))
129+
{
130+
Directory.CreateDirectory(parentDirectory);
131+
}
132+
entry.ExtractToFile(filePath, true);
133+
}
126134
#else
127135
filePath = Path.Combine(path, entry.FilenameInZip);
128136
zip.ExtractFile(entry, filePath);

ZipExtractor/ZipExtractor.csproj

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,41 @@
99
<Company>RBSoft</Company>
1010
<Product>ZipExtractor</Product>
1111
<Copyright>Copyright © 2012-2020 RBSoft</Copyright>
12-
<AssemblyVersion>1.2.0.0</AssemblyVersion>
13-
<FileVersion>1.2.0.0</FileVersion>
14-
<ApplicationVersion>1.2.0.0</ApplicationVersion>
12+
<AssemblyVersion>1.2.1.0</AssemblyVersion>
13+
<FileVersion>1.2.1.0</FileVersion>
14+
<ApplicationVersion>1.2.1.0</ApplicationVersion>
1515
<ApplicationIcon>ZipExtractor.ico</ApplicationIcon>
1616
<ApplicationManifest>app.manifest</ApplicationManifest>
1717
<SignAssembly>true</SignAssembly>
1818
<AssemblyOriginatorKeyFile>ZipExtractor.snk</AssemblyOriginatorKeyFile>
1919
<NeutralLanguage>en</NeutralLanguage>
20-
<DebugType>none</DebugType>
20+
<Version>1.2.1</Version>
21+
</PropertyGroup>
22+
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
23+
<DebugType>full</DebugType>
24+
<DebugSymbols>true</DebugSymbols>
2125
</PropertyGroup>
2226
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
2327
<OutputPath>..\AutoUpdater.NET\Resources</OutputPath>
2428
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
29+
<DebugType>none</DebugType>
30+
<DebugSymbols>false</DebugSymbols>
2531
</PropertyGroup>
2632
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
2733
<DefineConstants>NET45</DefineConstants>
2834
</PropertyGroup>
2935
<ItemGroup Condition=" '$(TargetFramework)' != 'net45' ">
30-
<PackageReference Include="ZipStorer" Version="3.6.0" />
36+
<PackageReference Include="ZipStorer" Version="3.6.0"/>
3137
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.18.1">
3238
<PrivateAssets>all</PrivateAssets>
3339
</PackageReference>
3440
</ItemGroup>
3541
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
36-
<Reference Include="System.IO.Compression" />
37-
<Reference Include="System.IO.Compression.FileSystem" />
42+
<Reference Include="System.IO.Compression"/>
43+
<Reference Include="System.IO.Compression.FileSystem"/>
3844
</ItemGroup>
3945
<ItemGroup>
40-
<Reference Include="System.Windows.Forms" />
46+
<Reference Include="System.Windows.Forms"/>
4147
</ItemGroup>
4248
<ItemGroup>
4349
<Compile Update="Properties\Settings.Designer.cs">

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
version: 1.6.1.{build}
1+
version: 1.6.2.{build}
22
environment:
3-
my_version: 1.6.1
3+
my_version: 1.6.2
44
my_secret:
55
secure: vbPRaZLQYpGPr4BrZZ4p6TofpSZMud+FKtlpqjgO8aA=
66
skip_branch_with_pr: true

0 commit comments

Comments
 (0)