Skip to content

Commit d1d2f99

Browse files
committed
Fixed pushing only first subdir + not pushing empty dirs
1 parent e0f25ea commit d1d2f99

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

adb/adb_commands.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ def Push(self, source_file, device_filename, mtime='0', timeout_ms=None):
153153
"""
154154

155155
if os.path.isdir(source_file):
156-
for dir in os.listdir(source_file):
157-
return self.Push(os.path.join(source_file, dir), device_filename + "/" + dir)
156+
self.Shell("mkdir " + device_filename)
157+
for dir_file in os.listdir(source_file):
158+
self.Push(os.path.join(source_file, dir_file), device_filename + "/" + dir_file)
159+
return
158160

159161
connection = self.protocol_handler.Open(
160162
self.handle, destination='sync:',

0 commit comments

Comments
 (0)