summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/restore/dirs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c
index c61737a..e822f5d 100644
--- a/sbin/restore/dirs.c
+++ b/sbin/restore/dirs.c
@@ -636,10 +636,12 @@ setdirmodes(flags)
panic("cannot find directory inode %d\n", node.ino);
} else {
cp = myname(ep);
- (void) chown(cp, node.uid, node.gid);
- (void) chmod(cp, node.mode);
- utimes(cp, node.timep);
- (void) chflags(cp, node.flags);
+ if (!Nflag) {
+ (void) chown(cp, node.uid, node.gid);
+ (void) chmod(cp, node.mode);
+ utimes(cp, node.timep);
+ (void) chflags(cp, node.flags);
+ }
ep->e_flags &= ~NEW;
}
}
OpenPOWER on IntegriCloud