Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1f06a37 authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

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

am: f98dedc4

Change-Id: I94146268a26e99bda31113f27bb2fe6bebaba85e
parents a142c241 f98dedc4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ struct TransferLedger {
    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%.