diff options
| author | 2017-11-14 10:49:36 +0000 | |
|---|---|---|
| committer | 2017-11-14 10:49:36 +0000 | |
| commit | 73de384319d25bcc59ce365f5ec7952febb94b58 (patch) | |
| tree | 7edef95e8f955d928f19ddf461d3150f774adf13 | |
| parent | cadbb8154e6f52258fcbb95188d71d700efb93a2 (diff) | |
| parent | 06ffecfe4260d64850df23023ed94b167438d996 (diff) | |
Merge "Don't add a '/' if it's already there."
| -rw-r--r-- | runtime/class_loader_context.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/class_loader_context.cc b/runtime/class_loader_context.cc index b62764f4c6..54e75588b9 100644 --- a/runtime/class_loader_context.cc +++ b/runtime/class_loader_context.cc @@ -209,7 +209,7 @@ bool ClassLoaderContext::OpenDexFiles(InstructionSet isa, const std::string& cla // If path is relative, append it to the provided base directory. std::string location = cp_elem; if (location[0] != '/' && !classpath_dir.empty()) { - location = classpath_dir + '/' + location; + location = classpath_dir + (classpath_dir.back() == '/' ? "" : "/") + location; } std::string error_msg; |