aboutsummaryrefslogtreecommitdiffstats
path: root/file_cmds/mtree/compare.c
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-05-21 09:21:42 -0400
committerCameron Katri <me@cameronkatri.com>2021-05-21 09:21:42 -0400
commitf06784df5a44c2aeb450ff88346a96f0bc9eb732 (patch)
tree49e9923a65f7cf572a6f0833737b72848299b1c8 /file_cmds/mtree/compare.c
parent0e3bb24ea8cde1573760b88ad56c1cc00be15cc8 (diff)
parent8d788054a62508f8d1b93067be16fb73f987ca8e (diff)
downloadapple_cmds-f06784df5a44c2aeb450ff88346a96f0bc9eb732.tar.gz
apple_cmds-f06784df5a44c2aeb450ff88346a96f0bc9eb732.zip
Merge branch 'apple'
Diffstat (limited to 'file_cmds/mtree/compare.c')
-rw-r--r--file_cmds/mtree/compare.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/file_cmds/mtree/compare.c b/file_cmds/mtree/compare.c
index e585928..366f12f 100644
--- a/file_cmds/mtree/compare.c
+++ b/file_cmds/mtree/compare.c
@@ -534,11 +534,18 @@ typeerr: LABEL;
int supported;
struct timespec ptimespec = ptime(p->fts_accpath, &supported);
if (!supported) {
- LABEL;
- (void)printf("%stime added to parent folder expected %.24s.%09ld found that it is not supported\n",
- tab, ctime(&s->st_ptimespec.tv_sec), s->st_ptimespec.tv_nsec);
- tab = "\t";
- } else if (supported && ((s->st_ptimespec.tv_sec != ptimespec.tv_sec) ||
+ if (mflag) {
+ ptimespec.tv_sec = 0;
+ ptimespec.tv_nsec = 0;
+ supported = 1;
+ } else {
+ LABEL;
+ (void)printf("%stime added to parent folder expected %.24s.%09ld found that it is not supported\n",
+ tab, ctime(&s->st_ptimespec.tv_sec), s->st_ptimespec.tv_nsec);
+ tab = "\t";
+ }
+ }
+ if (supported && ((s->st_ptimespec.tv_sec != ptimespec.tv_sec) ||
(s->st_ptimespec.tv_nsec != ptimespec.tv_nsec))) {
if (!mflag) {
LABEL;