AAPT2: Fix GetFileType for unicode and long paths on Windows
Bug: 68262818
Test: manual
Change-Id: I4f02e544e45865984ff4e021a7d1e83f8baf24c3
diff --git a/tools/aapt2/cmd/Compile.cpp b/tools/aapt2/cmd/Compile.cpp
index 53910af..83512b9 100644
--- a/tools/aapt2/cmd/Compile.cpp
+++ b/tools/aapt2/cmd/Compile.cpp
@@ -674,7 +674,7 @@
// Determine how to compile the file based on its type.
auto compile_func = &CompileFile;
- if (path_data.resource_dir == "values") {
+ if (path_data.resource_dir == "values" && path_data.extension == "xml") {
compile_func = &CompileTable;
// We use a different extension (not necessary anymore, but avoids altering the existing
// build system logic).