Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortherzok <marius.ungureanu@xamarin.com>2018-08-03 00:13:51 +0300
committerMarius Ungureanu <teromario@yahoo.com>2018-08-04 22:25:00 +0300
commit5d80737caa2e6b5df1f3d46bc769d6082a90aaad (patch)
treeab9504d2a49f7993c83f5a32ec5d2590f3781ec2 /main/src/addins/Deployment
parent93ecf61027d91b5c3705fc2014e3b7a951191106 (diff)
[Windows] Fix Coverity VSTS lane
Diffstat (limited to 'main/src/addins/Deployment')
-rw-r--r--main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.csproj2
-rw-r--r--main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment/DeployService.cs27
2 files changed, 27 insertions, 2 deletions
diff --git a/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.csproj b/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.csproj
index d50e0b90f6..57c363946f 100644
--- a/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.csproj
+++ b/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.csproj
@@ -11,6 +11,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugGnome|AnyCPU' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseGnome|AnyCPU' " />
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin32|AnyCPU' " />
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWin32|AnyCPU' " />
<ItemGroup>
<Reference Include="System" />
<Reference Include="Mono.Posix" />
diff --git a/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment/DeployService.cs b/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment/DeployService.cs
index 50eed3e382..fb960e7c81 100644
--- a/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment/DeployService.cs
+++ b/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment/DeployService.cs
@@ -174,10 +174,31 @@ namespace MonoDevelop.Deployment
}
}
+ // Temporary hack in place to build with GAC'd SharpZipLib on Windows
+ static void SetAsciiTranslate (TarArchive archive)
+ {
+#if WIN32
+ archive.SetAsciiTranslation (false);
+#else
+ archive.AsciiTranslate = false;
+#endif
+ }
+
+ static void CloseArchive (TarArchive archive)
+ {
+#if WIN32
+ archive?.CloseArchive ();
+#else
+ archive?.Close ();
+#endif
+ }
+
static void CreateTarArchive (ProgressMonitor mon, string folder, Stream outStream)
{
- using (var archive = TarArchive.CreateOutputTarArchive (outStream)) {
- archive.AsciiTranslate = false;
+ TarArchive archive = null;
+ try {
+ archive = TarArchive.CreateOutputTarArchive (outStream);
+ SetAsciiTranslate (archive);
archive.RootPath = folder;
archive.ProgressMessageEvent += delegate (TarArchive ac, TarEntry e, string message) {
if (message != null)
@@ -207,6 +228,8 @@ namespace MonoDevelop.Deployment
TarOutputStream tarOut = (TarOutputStream)tarOutField.GetValue (archive);
tarOut.Finish ();
}
+ } finally {
+ CloseArchive (archive);
}
}