shithub: wl3d

Download patch

ref: 35e90d35971631b97c76cb3a28ae222f8e6ba79b
parent: e3314aec0db093f27e1e29bcc3aa627fb1533cbb
author: qwx <[email protected]>
date: Tue May 5 14:50:01 EDT 2020

fs: mountid not always positive

--- a/fs.c
+++ b/fs.c
@@ -1309,7 +1309,7 @@
 	char *e;
 
 	rfork(RFNAMEG);
-	if(bind(".", dir, MBEFORE|MCREATE) < 0 || chdir(dir) < 0)
+	if(bind(".", dir, MBEFORE|MCREATE) == -1 || chdir(dir) < 0)
 		fprint(2, "dat: %r\n");
 	e = ext;
 	loadscr();