ref: 6288d3c9f7d8aa6f51142b423001c027659e5675
parent: 68beeec63928402068cca91c4b49fb30980f95ad
	author: mischief <mischief@offblast.org>
	date: Mon Aug 20 08:48:06 EDT 2018
	
hjfs: set group of new files to that of the parent directory (thanks umbraticus)
--- a/sys/src/cmd/hjfs/fs2.c
+++ b/sys/src/cmd/hjfs/fs2.c
@@ -108,6 +108,7 @@
int isdir;
Loc *l;
FLoc f;
+ short pgid;
b = nil;
l = nil;
@@ -150,6 +151,7 @@
l = getloc(ch->fs, f, ch->loc);
modified(ch, d);
b->op |= BDELWRI;
+ pgid = d->gid;
putbuf(b);
b = nil;
if(willmodify(ch->fs, l, ch->flags & CHFNOLOCK) < 0)
@@ -164,7 +166,8 @@
strcpy(d->name, name);
d->mtime = time(0);
d->atime = d->mtime;
- d->gid = d->uid = d->muid = ch->uid;
+ d->gid = pgid;
+ d->uid = d->muid = ch->uid;
d->mode = DALLOC | perm & 0777;
 	if((d->type & QTEXCL) != 0){qlock(&ch->loc->ex);
--
⑨