diff options
Diffstat (limited to 'runtime/oat_file_assistant.cc')
-rw-r--r-- | runtime/oat_file_assistant.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/runtime/oat_file_assistant.cc b/runtime/oat_file_assistant.cc index ed36df4091..1087ae7888 100644 --- a/runtime/oat_file_assistant.cc +++ b/runtime/oat_file_assistant.cc @@ -651,11 +651,7 @@ bool OatFileAssistant::DexLocationToOdexFilename(const std::string& location, // 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."; - return false; - } - std::string base = file.substr(0, pos); + std::string base = pos != std::string::npos ? file.substr(0, pos) : file; *odex_filename = dir + "/" + base + ".odex"; return true; |