From 7fc48ad1e15129ebe34e9f89b04bfbb68ced144d Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 8 Jul 2016 20:13:19 -0400 Subject: [PATCH] Fix some accidental Unicode/Binary string mistakes from b28ba49. --- adb-sync | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adb-sync b/adb-sync index 1f1f23b..a498bbf 100755 --- a/adb-sync +++ b/adb-sync @@ -226,7 +226,7 @@ class AdbFileSystem(object): with self.Stdout(self.adb + [b'shell', _sprintf(b'ls -al %s', self.QuoteArgument(path + b'/'))]) as stdout: for line in stdout: - if line.startswith('total '): + if line.startswith(b'total '): continue line = line.rstrip(b'\r\n') try: @@ -245,7 +245,7 @@ class AdbFileSystem(object): with self.Stdout(self.adb + [b'shell', _sprintf(b'ls -ald %s', self.QuoteArgument(path))]) as stdout: for line in stdout: - if line.startswith('total '): + if line.startswith(b'total '): continue line = line.rstrip(b'\r\n') statdata, filename = self.LsToStat(line) @@ -331,7 +331,7 @@ def BuildFileList(fs, path, prefix=b''): _print(b'Warning: could not cache lstat for %s', path) files.sort() for n in files: - if n == '.' or n == '..': + if n == b'.' or n == b'..': continue for t in BuildFileList(fs, path + b'/' + n, prefix + b'/' + n): yield t