From 24f165f121f3268c3239cabe5ac675a946fe6732 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 21 Aug 2015 20:31:31 -0700 Subject: [PATCH] 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 --- adb/commandline.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/adb/commandline.cpp b/adb/commandline.cpp index fd9953ca6..374a2e505 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++) {