shithub: riscv

Download patch

ref: 96a7ef06b806677d3e2f1bad6146af188770bcda
parent: 660fac829c37e1316716d28f3ebab3af77bcdca1
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Thu Nov 17 18:00:49 EST 2011

webfs: truncate cookie file when rewriting

--- a/sys/src/cmd/webfs/cookies.c
+++ b/sys/src/cmd/webfs/cookies.c
@@ -435,7 +435,7 @@
 
 	purgejar(jar);
 
-	b = Bopen(jar->file, OWRITE);
+	b = Bopen(jar->file, OTRUNC|OWRITE);
 	if(b == nil){
 		if(cookiedebug)
 			fprint(2, "Bopen write %s: %r", jar->file);