summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-08-21 20:31:31 -0700
committerElliott Hughes <enh@google.com>2015-08-26 22:30:56 +0000
commit24f165f121f3268c3239cabe5ac675a946fe6732 (patch)
tree2de55a074dd318b8c3ef28b3896cb3484cfd9cfa /adb
parent15361abe395a89c725fb99dfdec036283c5df8bf (diff)
downloadsystem_core-24f165f121f3268c3239cabe5ac675a946fe6732.zip
system_core-24f165f121f3268c3239cabe5ac675a946fe6732.tar.gz
system_core-24f165f121f3268c3239cabe5ac675a946fe6732.tar.bz2
Minimal fix for adb backup.
In master this code has been completely rewritten. This is the minimal fix against the mnc-sdk-release source. Bug: http://b/23015233 Bug: https://code.google.com/p/android/issues/detail?id=183490 Change-Id: Iac30993bd2b1b354f8518d8ea2a9ae680ebe4177
Diffstat (limited to 'adb')
-rw-r--r--adb/commandline.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/adb/commandline.cpp b/adb/commandline.cpp
index fd9953c..374a2e5 100644
--- a/adb/commandline.cpp
+++ b/adb/commandline.cpp
@@ -741,8 +741,10 @@ static int logcat(transport_type transport, const char* serial, int argc, const
static int mkdirs(const char *path)
{
+ std::string holder(path);
+
int ret;
- char *x = (char *)path + 1;
+ char *x = &holder[1];
for(;;) {
x = adb_dirstart(x);
@@ -759,7 +761,7 @@ static int mkdirs(const char *path)
}
static int backup(int argc, const char** argv) {
- const char* filename = "./backup.ab";
+ const char* filename = "backup.ab";
/* find, extract, and use any -f argument */
for (int i = 1; i < argc; i++) {