shithub: clone

Download patch

ref: 50b8eca6b085d2832dc14633e7de2efacbb0a5ce
parent: e88110ffdabc47c4b3c3ce10ab9f7cd134184c6e
author: kvik <[email protected]>
date: Sat Mar 2 12:53:05 EST 2019

fix the write error check

--- a/clone.c
+++ b/clone.c
@@ -442,7 +442,7 @@
 			error("can't read: %r");
 			sendul(f->errchan, ~0);
 		}
-		if(n > 0 && pwrite(dfd, buf, n, off) < n){
+		if(n > 0 && pwrite(dfd, buf, n, off) != n){
 			error("can't write: %r");
 			sendul(f->errchan, ~0);
 		}