summaryrefslogtreecommitdiff
path: root/runtime/oat_file_assistant.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/oat_file_assistant.cc')
-rw-r--r--runtime/oat_file_assistant.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc
index 9a17b01c02..d92f59bde6 100644
--- a/runtime/oat_file_assistant.cc
+++ b/runtime/oat_file_assistant.cc
@@ -737,18 +737,19 @@ bool OatFileAssistant::DexFilenameToOdexFilename(const std::string& location,
CHECK(error_msg != nullptr);
// The odex file name is formed by replacing the dex_location extension with
- // .odex and inserting an isa directory. For example:
+ // .odex and inserting an oat/<isa> directory. For example:
// location = /foo/bar/baz.jar
- // odex_location = /foo/bar/<isa>/baz.odex
+ // odex_location = /foo/bar/oat/<isa>/baz.odex
- // Find the directory portion of the dex location and add the isa directory.
+ // Find the directory portion of the dex location and add the oat/<isa>
+ // directory.
size_t pos = location.rfind('/');
if (pos == std::string::npos) {
*error_msg = "Dex location " + location + " has no directory.";
return false;
}
std::string dir = location.substr(0, pos+1);
- dir += std::string(GetInstructionSetString(isa));
+ dir += "oat/" + std::string(GetInstructionSetString(isa));
// Find the file portion of the dex location.
std::string file;