From f2bd4b0351829da6658cfc892bdd2481de4cb0c0 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 9 Feb 2018 10:51:45 +0000 Subject: [PATCH] Detect ls errors that appear on stdout instead of stderr --- renderdoc/android/android.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/renderdoc/android/android.cpp b/renderdoc/android/android.cpp index 3f2940efc..fe125b2e8 100644 --- a/renderdoc/android/android.cpp +++ b/renderdoc/android/android.cpp @@ -148,6 +148,11 @@ uint32_t StartAndroidPackageForCapture(const char *host, const char *package) adbExecCommand(deviceID, "shell ls " + installedPath + "/lib/*/" RENDERDOC_ANDROID_LIBRARY) .strStdout); + // some versions of adb/android return the error message on stdout, so try to detect those and + // clear the output. + if(RDCLib.size() < installedPath.size() || RDCLib.substr(0, installedPath.size()) != installedPath) + RDCLib.clear(); + bool injectLibraries = true; if(RDCLib.empty())