Add context to error message.
Would have been very useful to avoid http://b/227682097
Bug: 227682097
Test: m apexer apexer_test deapexer debugfs_static; atest --host apexer_test
Change-Id: I24234d053a06868493831d40f94f7e46956391a1
diff --git a/tools/aapt2/util/Files.cpp b/tools/aapt2/util/Files.cpp
index be09545..383be56 100644
--- a/tools/aapt2/util/Files.cpp
+++ b/tools/aapt2/util/Files.cpp
@@ -349,7 +349,7 @@
const std::string root_dir = path.to_string();
std::unique_ptr<DIR, decltype(closedir)*> d(opendir(root_dir.data()), closedir);
if (!d) {
- diag->Error(DiagMessage() << SystemErrorCodeToString(errno));
+ diag->Error(DiagMessage() << SystemErrorCodeToString(errno) << ": " << root_dir);
return {};
}