From fd6a98cfbaaf2348b5a965338113afd948aca357 Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Tue, 27 Nov 2018 16:58:02 +0100 Subject: [PATCH] Fix: size is only know for regular files (#23) --- adb-sync | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adb-sync b/adb-sync index 53c37c1..82feadf 100755 --- a/adb-sync +++ b/adb-sync @@ -582,7 +582,8 @@ class FileSyncer(object): with self.InterruptProtection(self.dst_fs[i], dst_name): if not self.dry_run: self.copy[i](src_name, dst_name) - self.num_bytes += s.st_size + if stat.S_ISREG(s.st_mode): + self.num_bytes += s.st_size if not self.dry_run: if self.preserve_times: _print(b'%s-Times: accessed %s, modified %s',