mirror of
https://github.com/google/adb-sync.git
synced 2026-01-04 10:28:01 +00:00
Fix some accidental Unicode/Binary string mistakes from b28ba49.
This commit is contained in:
6
adb-sync
6
adb-sync
@@ -226,7 +226,7 @@ class AdbFileSystem(object):
|
|||||||
with self.Stdout(self.adb + [b'shell', _sprintf(b'ls -al %s',
|
with self.Stdout(self.adb + [b'shell', _sprintf(b'ls -al %s',
|
||||||
self.QuoteArgument(path + b'/'))]) as stdout:
|
self.QuoteArgument(path + b'/'))]) as stdout:
|
||||||
for line in stdout:
|
for line in stdout:
|
||||||
if line.startswith('total '):
|
if line.startswith(b'total '):
|
||||||
continue
|
continue
|
||||||
line = line.rstrip(b'\r\n')
|
line = line.rstrip(b'\r\n')
|
||||||
try:
|
try:
|
||||||
@@ -245,7 +245,7 @@ class AdbFileSystem(object):
|
|||||||
with self.Stdout(self.adb + [b'shell', _sprintf(b'ls -ald %s',
|
with self.Stdout(self.adb + [b'shell', _sprintf(b'ls -ald %s',
|
||||||
self.QuoteArgument(path))]) as stdout:
|
self.QuoteArgument(path))]) as stdout:
|
||||||
for line in stdout:
|
for line in stdout:
|
||||||
if line.startswith('total '):
|
if line.startswith(b'total '):
|
||||||
continue
|
continue
|
||||||
line = line.rstrip(b'\r\n')
|
line = line.rstrip(b'\r\n')
|
||||||
statdata, filename = self.LsToStat(line)
|
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)
|
_print(b'Warning: could not cache lstat for %s', path)
|
||||||
files.sort()
|
files.sort()
|
||||||
for n in files:
|
for n in files:
|
||||||
if n == '.' or n == '..':
|
if n == b'.' or n == b'..':
|
||||||
continue
|
continue
|
||||||
for t in BuildFileList(fs, path + b'/' + n, prefix + b'/' + n):
|
for t in BuildFileList(fs, path + b'/' + n, prefix + b'/' + n):
|
||||||
yield t
|
yield t
|
||||||
|
|||||||
Reference in New Issue
Block a user