File extlib-install.patch of Package ocaml-extlib

Index: extlib-1.6.1/install.ml
===================================================================
--- extlib-1.6.1.orig/install.ml
+++ extlib-1.6.1/install.ml
@@ -64,10 +64,18 @@ let copy file dest =
 		print_endline ("Installing " ^ file);
 		let path = dest ^ file in
 		(try Sys.remove path with _ -> ());
-		try
-			Sys.rename file path;
-		with
-			_ -> failwith "Aborted"
+		let ichan = open_in file in
+		let ochan = open_out path in
+		let buf = String.create 1024 in
+		let rec loop () =
+			let len = input ichan buf 0 1024 in
+			if len > 0 then (
+				output ochan buf 0 len;
+				loop ()
+			)
+		in
+		loop ();
+		Sys.remove file
 	end
 
 let get_version () =
openSUSE Build Service is sponsored by