diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-07-12 18:54:22 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-07-12 18:54:22 +0200 |
commit | 2c8c2bc7272815f4535d4922a73ec5b484f42c3a (patch) | |
tree | d50545cead9c652e7e6ea7b9e15d5fda7d493d26 /sys/src/cmd/hjfs/fs1.c | |
parent | a469cffafe23135da443b078bf82ad45833ff37a (diff) |
hjfs: update mtime and qid.vers for directory on rename
when wstating a file, its directory should be updated to
reflect this change.
here is what the manpage states:
> The mtime field reflects the time of the last change of content
> (except when later changed by wstat). For a directory it is the
> time of the most recent remove, create, or wstat of a file in the
> directory.
Diffstat (limited to 'sys/src/cmd/hjfs/fs1.c')
-rw-r--r-- | sys/src/cmd/hjfs/fs1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/hjfs/fs1.c b/sys/src/cmd/hjfs/fs1.c index a8dc65a64..b53fc4031 100644 --- a/sys/src/cmd/hjfs/fs1.c +++ b/sys/src/cmd/hjfs/fs1.c @@ -849,12 +849,12 @@ findentry(Fs *fs, FLoc *l, Buf *b, char *name, FLoc *rl, int dump) } void -modified(Chan *ch, Dentry *d) +modified(Loc *loc, Dentry *d, short uid) { d->mtime = time(0); d->atime = d->mtime; - d->muid = ch->uid; - ch->loc->vers = ++d->vers; + d->muid = uid; + loc->vers = ++d->vers; } typedef struct Del Del; |