shithub: riscv

Download patch

ref: 7011194af157e5d84f4fe7ce5868a5d529c219e3
parent: 694597de3b77db6d2973fe0e40a19a490a4fa7db
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Sep 16 18:33:27 EDT 2014

ramfs: fix directory check in wstat() (thanks mischief)

--- a/sys/src/cmd/ramfs.c
+++ b/sys/src/cmd/ramfs.c
@@ -285,7 +285,7 @@
 			respond(r, Ebadoff);
 			return;
 		}
-	 	if(!hasperm(f, u, AWRITE) || (r->d.mode & DMDIR) != 0)
+	 	if(!hasperm(f, u, AWRITE) || (f->mode & DMDIR) != 0)
 			goto Perm;
 	}