Loading adb/file_sync_client.cpp +17 −4 Original line number Diff line number Diff line Loading @@ -185,9 +185,16 @@ class SyncConnection { total_bytes += bytes_read; bytes_copied += bytes_read; if (total_size == 0) { // This case can happen if we're racing against something that wrote to the file // between our stat and our read, or if we're reading a magic file that lies about // its size. Printf("%s: ?%%", rpath); } else { int percentage = static_cast<int>(bytes_copied * 100 / total_size); Printf("%s: %d%%", rpath, percentage); } } adb_close(lfd); Loading Loading @@ -472,9 +479,15 @@ static bool sync_recv(SyncConnection& sc, const char* rpath, const char* lpath) bytes_copied += msg.data.size; if (size == 0) { // This case can happen if we're racing against something that wrote to the file between // our stat and our read, or if we're reading a magic file that lies about its size. sc.Printf("%s: ?%%", rpath); } else { int percentage = static_cast<int>(bytes_copied * 100 / size); sc.Printf("%s: %d%%", rpath, percentage); } } adb_close(lfd); return true; Loading Loading
adb/file_sync_client.cpp +17 −4 Original line number Diff line number Diff line Loading @@ -185,9 +185,16 @@ class SyncConnection { total_bytes += bytes_read; bytes_copied += bytes_read; if (total_size == 0) { // This case can happen if we're racing against something that wrote to the file // between our stat and our read, or if we're reading a magic file that lies about // its size. Printf("%s: ?%%", rpath); } else { int percentage = static_cast<int>(bytes_copied * 100 / total_size); Printf("%s: %d%%", rpath, percentage); } } adb_close(lfd); Loading Loading @@ -472,9 +479,15 @@ static bool sync_recv(SyncConnection& sc, const char* rpath, const char* lpath) bytes_copied += msg.data.size; if (size == 0) { // This case can happen if we're racing against something that wrote to the file between // our stat and our read, or if we're reading a magic file that lies about its size. sc.Printf("%s: ?%%", rpath); } else { int percentage = static_cast<int>(bytes_copied * 100 / size); sc.Printf("%s: %d%%", rpath, percentage); } } adb_close(lfd); return true; Loading