summaryrefslogtreecommitdiff
path: root/tools/aapt2/cmd/Compile.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-05-26 16:31:38 -0700
committerAdam Lesinski <adamlesinski@google.com>2017-05-26 16:56:34 -0700
commit2354b568379fe31ba4e774f7a92d4c685a60a2ab (patch)
tree585bb0c60c38428e2328beb330fd2fc79e11e7d2 /tools/aapt2/cmd/Compile.cpp
parentbacaffa497de1877657f9cb3f59a82e3955f0f75 (diff)
AAPT2: Follow symlinks when compiling
Bug: 62144459 Test: make AaptSymlinkTest Change-Id: Idb3ab1ece17c52bb4fd174ec4c08a9e173289e55
Diffstat (limited to 'tools/aapt2/cmd/Compile.cpp')
-rw-r--r--tools/aapt2/cmd/Compile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/aapt2/cmd/Compile.cpp b/tools/aapt2/cmd/Compile.cpp
index 5adf04a4dcbb..e09a39796592 100644
--- a/tools/aapt2/cmd/Compile.cpp
+++ b/tools/aapt2/cmd/Compile.cpp
@@ -478,7 +478,8 @@ static bool CompilePng(IAaptContext* context, const CompileOptions& options,
{
std::string content;
- if (!android::base::ReadFileToString(path_data.source.path, &content)) {
+ if (!android::base::ReadFileToString(path_data.source.path, &content,
+ true /*follow_symlinks*/)) {
context->GetDiagnostics()->Error(DiagMessage(path_data.source)
<< android::base::SystemErrorCodeToString(errno));
return false;