Merge "adb: fix progress percentage when pulling symlinks."
am: 453db013b0

Change-Id: I3789390531b46c7dc5ac6796e62e6e43bba3bcca
diff --git a/adb/file_sync_client.cpp b/adb/file_sync_client.cpp
index f1e4179..115095c 100644
--- a/adb/file_sync_client.cpp
+++ b/adb/file_sync_client.cpp
@@ -149,7 +149,7 @@
     void ReportProgress(LinePrinter& lp, const std::string& file, uint64_t file_copied_bytes,
                         uint64_t file_total_bytes) {
         char overall_percentage_str[5] = "?";
-        if (bytes_expected != 0) {
+        if (bytes_expected != 0 && bytes_transferred <= bytes_expected) {
             int overall_percentage = static_cast<int>(bytes_transferred * 100 / bytes_expected);
             // If we're pulling symbolic links, we'll pull the target of the link rather than
             // just create a local link, and that will cause us to go over 100%.