forked from Swind/pure-python-adb
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hello.
Is there a way to preserve timestamps on pull, and optionally permissions?
[edit]
Never mind, in ppadb/device.py:
Instead of
self._pull(str(src), str(dest))
have
self._pull(str(src), str(dest))
try:
mtime_str = self.shell(f"stat --format='%.Y' \"{src}\"")
mtime_float = float(mtime_str)
os.utime(dest, (mtime_float, mtime_float))
except:
print(f"Setting mtime failed {dest}")
And of course at the top of the file:
import os
Permissions is a nightmare across different filesystems, so have left that alone.
Metadata
Metadata
Assignees
Labels
No labels