diff options
| -rw-r--r-- | runtime/oat_file_assistant.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc index 3396ce0b57..db6f8ee488 100644 --- a/runtime/oat_file_assistant.cc +++ b/runtime/oat_file_assistant.cc @@ -640,15 +640,8 @@ bool OatFileAssistant::DexLocationToOdexFilename(const std::string& location, std::string dir = location.substr(0, pos+1); dir += "oat/" + std::string(GetInstructionSetString(isa)); - // Find the file portion of the dex location. - std::string file; - if (pos == std::string::npos) { - file = location; - } else { - file = location.substr(pos+1); - } - // Get the base part of the file without the extension. + std::string file = location.substr(pos+1); pos = file.rfind('.'); if (pos == std::string::npos) { *error_msg = "Dex location " + location + " has no extension."; |