From e9a6d8f4cdab994e86c4841f0705ec04ba30a488 Mon Sep 17 00:00:00 2001 From: mydongistiny Date: Tue, 21 May 2019 02:42:37 -0700 Subject: [PATCH] Fix --times with current Android toolbox When trying to use --times to push back to a device it fails because of the current versions of toolbox used on Android devices. Signed-off-by: mydongistiny --- adb-sync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adb-sync b/adb-sync index 3b4eaf6..8379dbf 100755 --- a/adb-sync +++ b/adb-sync @@ -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 +