Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d4ae91e authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Code Review
Browse files

Merge "acp: Ensure dst mtime always greater or equal to src mtime"

parents 4e3c6686 a67bc110
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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)));