Merge "adb: don't append a slash to a path that already ends with one."
This commit is contained in:
commit
aae1eb2c4f
1 changed files with 5 additions and 2 deletions
|
|
@ -753,8 +753,11 @@ bool do_sync_push(const std::vector<const char*>& srcs, const char* dst) {
|
||||||
if (dst_isdir) {
|
if (dst_isdir) {
|
||||||
// If we're copying a local file to a remote directory,
|
// If we're copying a local file to a remote directory,
|
||||||
// we really want to copy to remote_dir + "/" + local_filename.
|
// we really want to copy to remote_dir + "/" + local_filename.
|
||||||
path_holder = android::base::StringPrintf(
|
path_holder = dst_path;
|
||||||
"%s/%s", dst_path, adb_basename(src_path).c_str());
|
if (path_holder.back() != '/') {
|
||||||
|
path_holder.push_back('/');
|
||||||
|
}
|
||||||
|
path_holder += adb_basename(src_path);
|
||||||
dst_path = path_holder.c_str();
|
dst_path = path_holder.c_str();
|
||||||
}
|
}
|
||||||
sc.SetExpectedTotalBytes(st.st_size);
|
sc.SetExpectedTotalBytes(st.st_size);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue