From 192779a1b79c5d94ab08b8ca24054f42beb5ab83 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 15 Apr 2012 11:50:03 +0200 Subject: [PATCH] repo git: on conflicts, put timestamp before file extension. Fixes #699 --- SparkleLib/Git/SparkleRepoGit.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 5d30cde7..97a988d9 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -491,7 +491,9 @@ namespace SparkleLib.Git { // Windows doesn't allow colons in the file name, so // we use "h" between the hours and minutes instead. string timestamp = DateTime.Now.ToString ("MMM d H\\hmm"); - string their_path = conflicting_path + " (" + SparkleConfig.DefaultConfig.User.Name + ", " + timestamp + ")"; + string their_path = Path.GetFileNameWithoutExtension (conflicting_path) + + " (" + SparkleConfig.DefaultConfig.User.Name + ", " + timestamp + ")" + Path.GetExtension (conflicting_path); + string abs_conflicting_path = Path.Combine (LocalPath, conflicting_path); string abs_their_path = Path.Combine (LocalPath, their_path);