From a0db35d8772f6dd9c92ea74b20fd77936576088c Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 27 Aug 2011 02:42:09 +0200 Subject: [PATCH] Use 'h' as hour-minute separator, as Windows doesn't allow ':' in file names --- SparkleLib/Git/SparkleRepoGit.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 62bd89f7..a81fad71 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -320,8 +320,10 @@ namespace SparkleLib { git_theirs.Start (); git_theirs.WaitForExit (); - // Append a timestamp to local version - string timestamp = DateTime.Now.ToString ("HH:mm MMM d"); + // Append a timestamp to local version. + // Windows doesn't allow colons in the file name, so + // we use "h" between the hours and minutes instead. + string timestamp = DateTime.Now.ToString ("HH\\hmm MMM d"); string their_path = conflicting_path + " (" + SparkleConfig.DefaultConfig.User.Name + ", " + timestamp + ")"; string abs_conflicting_path = Path.Combine (LocalPath, conflicting_path); string abs_their_path = Path.Combine (LocalPath, their_path);