From 2daa8a843f16175b38d827dae805c11fcc7ee85b Mon Sep 17 00:00:00 2001 From: totoro Date: Sat, 18 Jan 2020 13:50:46 +0100 Subject: [PATCH] remove file if already exists --- string/crlf.anubis | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/string/crlf.anubis b/string/crlf.anubis index 234c95f..f944dd3 100644 --- a/string/crlf.anubis +++ b/string/crlf.anubis @@ -104,6 +104,8 @@ public define ResultCopy ByteArray -> ByteArray converter, Bool keep_org )= + //remove the temporary file if exists + forget(remove(file+".tmp")); if rename(file, file+".tmp") then with result = copy_file_and_convert_to_CRLF(file+".tmp", file, converter), (if keep_org then -- libgit2 0.21.4