From db542ccecef19886b938c10ae27dde3c10347a04 Mon Sep 17 00:00:00 2001 From: Benjamin Lee Date: Tue, 27 Jul 2021 18:19:21 -0700 Subject: [PATCH] Fix ManifestMergerAction test case on windows --- .../google/devtools/build/android/ManifestMergerAction.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java b/src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java index 3d7d273405cf41..54e487d3dd1f18 100644 --- a/src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java +++ b/src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java @@ -174,8 +174,7 @@ private static Path removePermissions(Path manifest, Path outputDir) } } // Write resulting manifest to the output directory, maintaining full path to prevent collisions - Path output = outputDir.resolve(manifest.toString().replaceFirst("^/", "")); - Files.createDirectories(output.getParent()); + Path output = Files.createTempFile(outputDir, "AndroidManifest", ".xml"); TransformerFactory.newInstance() .newTransformer() .transform(new DOMSource(doc), new StreamResult(output.toFile()));