diff --git a/string/crlf.anubis b/string/crlf.anubis index 503358a..4c7b2cd 100644 --- a/string/crlf.anubis +++ b/string/crlf.anubis @@ -101,13 +101,26 @@ public define ResultCopy copy_file_and_convert_to_CRLF ( String file, - ByteArray -> ByteArray converter + ByteArray -> ByteArray converter, + Bool keep_org )= if rename(file, file+".tmp") then with result = copy_file_and_convert_to_CRLF(file+".tmp", file, converter), - forget(remove(file+".tmp")); + (if keep_org then + unique + else + forget(remove(file+".tmp"))); result else - cant_create_file. + cant_create_file +. +public define ResultCopy + copy_file_and_convert_to_CRLF + ( + String file, + ByteArray -> ByteArray converter + )= + copy_file_and_convert_to_CRLF(file, converter, false) +. -- libgit2 0.21.4