google / adb-sync

Apache License 2.0
1.09k stars 172 forks source link

Fix --times with current Android toolbox #39

Open mydongistiny opened 5 years ago

mydongistiny commented 5 years ago

When trying to use --times to push files back to a device it fails with the error:

touch: bad '20190519.083235'
INFO:root:Total: 23412 KB/s (1256329659 bytes in 52.402s)
Traceback (most recent call last):
  File "./adb-sync", line 883, in <module>
    main()
  File "./adb-sync", line 877, in main
    syncer.PerformCopies()
  File "./adb-sync", line 646, in PerformCopies
    self.dst_fs[i].utime(dst_name, (s.st_atime, s.st_mtime))
  File "./adb-sync", line 312, in utime
    raise OSError('touch failed')
OSError: touch failed

because of the current versions of toolbox used on Android devices. So this change fixes the format.

lingnand commented 5 years ago

Just encountered this and implemented the exact same fix myself. Could we get this merged in so ppl don't waste effort again?

rubaboo commented 5 years ago

Merge please!