shithub: clone

Download patch

ref: 60568e2476de3fc5117c0d00bc6ad682ecbbc135
parent: 58124e1268641c53c97ff28530c15c60a3e12305
author: kvik <kvik@a-b.xyz>
date: Wed Mar 6 09:57:59 EST 2019

fix not failing on error

--- a/clone.c
+++ b/clone.c
@@ -502,8 +502,9 @@
 			error("can't create: %r");
 			goto End;
 		}
-		if(clonefile(f) < 0 && remove(tmp) < 0){
-			error("can't remove: %r");
+		if(clonefile(f) < 0){
+			if(remove(tmp) < 0)
+				error("can't remove: %r");
 			goto End;
 		}
 		cloneattr(f->dfd, f);