Merge "adb: don\'t use adb_dirname in between getting and printing errno." am: 44901f1147 am: 975c9a6863

am: 01f7f6fb03

* commit '01f7f6fb0323187a413dda937b9b893964fca5c9':
  adb: don't use adb_dirname in between getting and printing errno.
This commit is contained in:
Josh Gao 2015-11-18 19:18:23 +00:00 committed by android-build-merger
commit 00be90244d

View file

@ -403,9 +403,9 @@ static bool sync_recv(SyncConnection& sc, const char* rpath, const char* lpath)
if (!sc.SendRequest(ID_RECV, rpath)) return false;
adb_unlink(lpath);
if (!mkdirs(adb_dirname(lpath))) {
sc.Error("failed to create parent directory '%s': %s",
adb_dirname(lpath).c_str(), strerror(errno));
const std::string dirpath = adb_dirname(lpath);
if (!mkdirs(dirpath.c_str())) {
sc.Error("failed to create parent directory '%s': %s", dirpath.c_str(), strerror(errno));
return false;
}