summaryrefslogtreecommitdiff
path: root/libartbase/base/file_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libartbase/base/file_utils.cc')
-rw-r--r--libartbase/base/file_utils.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/libartbase/base/file_utils.cc b/libartbase/base/file_utils.cc
index c6c1b50a71..884bca15b7 100644
--- a/libartbase/base/file_utils.cc
+++ b/libartbase/base/file_utils.cc
@@ -644,14 +644,12 @@ bool LocationIsOnSystem(const std::string& location) {
LOG(FATAL) << "LocationIsOnSystem is unsupported on Windows.";
return false;
#else
- UniqueCPtr<const char[]> full_path(realpath(location.c_str(), nullptr));
- return full_path != nullptr &&
- android::base::StartsWith(full_path.get(), GetAndroidRoot().c_str());
+ return android::base::StartsWith(location, GetAndroidRoot().c_str());
#endif
}
bool LocationIsTrusted(const std::string& location, bool trust_art_apex_data_files) {
- if (LocationIsOnSystem(location)) {
+ if (LocationIsOnSystem(location) || LocationIsOnArtModule(location)) {
return true;
}
return LocationIsOnArtApexData(location) & trust_art_apex_data_files;