Skip to content

Commit

Permalink
fix touch timestamp; duplicate of google#39
Browse files Browse the repository at this point in the history
  • Loading branch information
lingnand authored and aviallon committed Jun 22, 2020
1 parent fb7c549 commit ecee7fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adb-sync
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,14 @@ class AdbFileSystem(GlobLike, OSLike):
# TODO(rpolzer): Find out why this does not work (returns status 255).
"""Set the time of a file to a specified unix time."""
atime, mtime = times
timestr = time.strftime('%Y%m%d.%H%M%S',
timestr = time.strftime('%Y%m%d%H%M.%S',
time.localtime(mtime)).encode('ascii')
if subprocess.call(
self.adb +
[b'shell',
b'touch -mt %s %s' % (timestr, self.QuoteArgument(path))]) != 0:
raise OSError('touch failed')
timestr = time.strftime('%Y%m%d.%H%M%S',
timestr = time.strftime('%Y%m%d%H%M.%S',
time.localtime(atime)).encode('ascii')
if subprocess.call(
self.adb +
Expand Down

0 comments on commit ecee7fc

Please sign in to comment.