From 5ee839ec72838b4d94967e093fbc3867cba9447b Mon Sep 17 00:00:00 2001 From: tfoman Date: Fri, 16 Jan 2015 08:05:28 +0100 Subject: [PATCH] dont backup non existing files ... --- CobXmlSupport/ShowCode.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CobXmlSupport/ShowCode.cs b/CobXmlSupport/ShowCode.cs index c10e286..d5531aa 100644 --- a/CobXmlSupport/ShowCode.cs +++ b/CobXmlSupport/ShowCode.cs @@ -123,7 +123,10 @@ namespace CobXmlSupport File.Delete(backupfile); } - File.Move(inPath + codeFile, backupfile );//+ DateTime.Now.ToString()); + if (File.Exists(inPath + codeFile)) + { + File.Move(inPath + codeFile, backupfile);//+ DateTime.Now.ToString()); + } File.WriteAllText(inPath + codeFile, codeComplInit); refreshWindow();