summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2017-11-14 10:49:36 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-11-14 10:49:36 +0000
commit73de384319d25bcc59ce365f5ec7952febb94b58 (patch)
tree7edef95e8f955d928f19ddf461d3150f774adf13
parentcadbb8154e6f52258fcbb95188d71d700efb93a2 (diff)
parent06ffecfe4260d64850df23023ed94b167438d996 (diff)
Merge "Don't add a '/' if it's already there."
-rw-r--r--runtime/class_loader_context.cc2
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;