Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tasks] _UpdateAndroidResgen is throwing new AP…
Browse files Browse the repository at this point in the history
…T0000 errors in d15-4 (#769)

Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58889
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58890

Commit 0667a2b and ea6b9b4 added support for short path names.
However during the rework we added code to replace

	library_project_imports/

with an empty string. Some of the Nuget Support packages seem
to include a `__AndroidLibraryProjects__.zip` which uses
windows path sepatators rather than unix ones. So the code
to strip off the `library_project_imports/` does not work.
We end up with a directory structure like

	__library_projects__/[dllname]/library_project_imports/library_project_imports

which a) does not get picked up by our tasks and b) takes up
a bunch of additional characters in our already long path..

The result is the two errors above... one to do with missing resources
the other a PathToLong error.

Because the nuget packages have already shipped and will be in use,
we need to handle BOTH cases.
  • Loading branch information
dellis1972 authored and jonpryor committed Aug 23, 2017
1 parent 3294a50 commit 88936a2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -264,7 +264,9 @@ void Extract (
// __library_projects__/[dllname]/[library_project_imports | jlibs]/bin
using (var zip = MonoAndroidHelper.ReadZipFile (finfo.FullName)) {
updated |= Files.ExtractAll (zip, importsDir, modifyCallback: (entryFullName) => {
return entryFullName.Replace ("library_project_imports/", "");
return entryFullName
.Replace ("library_project_imports\\","")
.Replace ("library_project_imports/", "");
}, deleteCallback: (fileToDelete) => {
return !jars.Contains (fileToDelete);
}, forceUpdate: false);

0 comments on commit 88936a2

Please sign in to comment.