From 2a0efcf466bdf34c9d6680a95f6740cd33c19ed1 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Fri, 8 Jul 2016 10:51:00 +0100 Subject: [PATCH] Fix a pathing issue when creating the Proguard Input Jar The switch over to using LibZipSharp means that the API to ZipArchive.AddFile slightly changed. Wtih Ionic.Zip you just needed to provide the target Directory in the zip. With LibZipSharp you need to provide the full path in the zip including the filename. This commit fixes that issue. --- src/Xamarin.Android.Build.Tasks/Tasks/Proguard.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/Proguard.cs b/src/Xamarin.Android.Build.Tasks/Tasks/Proguard.cs index c9a94cc1b9c..6a1682f3ec8 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/Proguard.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/Proguard.cs @@ -126,7 +126,7 @@ protected override string GenerateCommandLineCommands () File.Delete (ProguardJarInput); using (var zip = ZipArchive.Open (ProguardJarInput, FileMode.Create)) { foreach (var file in Directory.GetFiles (classesFullPath, "*", SearchOption.AllDirectories)) - zip.AddFile (file, Path.GetDirectoryName (file.Substring (classesFullPath.Length))); + zip.AddFile (file, Path.Combine (Path.GetDirectoryName (file.Substring (classesFullPath.Length)), Path.GetFileName (file))); } var acwLines = File.ReadAllLines (AcwMapFile);