From c538efe885ebebe5319f794d715d7541d2c2df93 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 1 Dec 2012 17:53:24 +0000 Subject: [PATCH] setup: prevent a crash when moving the link code file --- SparkleShare/SparkleSetupController.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SparkleShare/SparkleSetupController.cs b/SparkleShare/SparkleSetupController.cs index 415546dc..9c77ffe1 100755 --- a/SparkleShare/SparkleSetupController.cs +++ b/SparkleShare/SparkleSetupController.cs @@ -249,6 +249,10 @@ namespace SparkleShare { name += "'s"; string new_file_path = Path.Combine (Program.Controller.FoldersPath, name + " link code.txt"); + + if (File.Exists (new_file_path)) + File.Delete (new_file_path); + File.Move (link_code_file_path, new_file_path); }