summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-07-08 09:47:08 -0700
committerAndroid Code Review <code-review@android.com>2010-07-08 09:47:08 -0700
commit7d4ae91e0bba6553673b5ab439e639ca0c8d3221 (patch)
tree8352030848d62b51256b7c1dcdb0fd1ede7ebf93 /libs
parent4e3c6686d15423a41a419b78143852eebfc2eb46 (diff)
parenta67bc11058f47eeba1f8bb30173c73ec0af8fcce (diff)
downloadbuild-7d4ae91e0bba6553673b5ab439e639ca0c8d3221.zip
build-7d4ae91e0bba6553673b5ab439e639ca0c8d3221.tar.gz
build-7d4ae91e0bba6553673b5ab439e639ca0c8d3221.tar.bz2
Merge "acp: Ensure dst mtime always greater or equal to src mtime"
Diffstat (limited to 'libs')
-rw-r--r--libs/host/CopyFile.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/host/CopyFile.c b/libs/host/CopyFile.c
index a822b41..8cdf07a 100644
--- a/libs/host/CopyFile.c
+++ b/libs/host/CopyFile.c
@@ -151,6 +151,12 @@ static int setPermissions(const char* dst, const struct stat* pSrcStat, unsigned
*/
ut.actime = pSrcStat->st_atime;
ut.modtime = pSrcStat->st_mtime;
+#ifdef MACOSX_RSRC
+ if (pSrcStat->st_mtimespec.tv_nsec > 0)
+#else
+ if (pSrcStat->st_mtim.tv_nsec > 0)
+#endif
+ ut.modtime += 1;
if (utime(dst, &ut) != 0) {
DBUG(("--- unable to set timestamps on '%s': %s\n",
dst, strerror(errno)));