Skip to content

Commit b7a5393

Browse files
authored
afc: make afc pull also modify the mtime of files
1 parent b7d72b6 commit b7a5393

File tree

1 file changed

+1
-0
lines changed
  • pymobiledevice3/services

1 file changed

+1
-0
lines changed

pymobiledevice3/services/afc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ def pull(self, relative_src, dst, callback=None, src_dir=''):
234234
dst = os.path.join(dst, os.path.basename(relative_src))
235235
with open(dst, 'wb') as f:
236236
f.write(self.get_file_contents(src))
237+
os.utime(dst, (os.stat(dst).st_atime, self.stat(src)['st_mtime'].timestamp()))
237238
else:
238239
# directory
239240
dst_path = pathlib.Path(dst) / os.path.basename(relative_src)

0 commit comments

Comments
 (0)