Log pre-realpath path in openImageService
The log message was showing the result of the a function call
that failed, thus inconsistent.
Print the path that was asked for realpath translation instead.
Bug: none
Test: libsnapshot_test
Change-Id: Idd093fe79963f51aaf00b213ad460b6ddb158232
Signed-off-by: Alessio Balsini <[email protected]>
diff --git a/gsi_service.cpp b/gsi_service.cpp
index 9b74502..611f855 100644
--- a/gsi_service.cpp
+++ b/gsi_service.cpp
@@ -647,11 +647,11 @@
}
std::string metadata_dir, data_dir;
if (!android::base::Realpath(in_metadata_dir, &metadata_dir)) {
- PLOG(ERROR) << "realpath failed: " << metadata_dir;
+ PLOG(ERROR) << "realpath failed for metadata: " << in_metadata_dir;
return BinderError("Invalid path");
}
if (!android::base::Realpath(in_data_dir, &data_dir)) {
- PLOG(ERROR) << "realpath failed: " << data_dir;
+ PLOG(ERROR) << "realpath failed for data: " << in_data_dir;
return BinderError("Invalid path");
}
if (!android::base::StartsWith(metadata_dir, kImageMetadataPrefix) ||