[fetcher] Fix InstallConfiguration method
This commit is contained in:
parent
ad712b6919
commit
fa4e7dd368
|
@ -83,7 +83,7 @@ namespace SparkleLib {
|
|||
|
||||
} else {
|
||||
|
||||
InstallUserInfo ();
|
||||
InstallConfiguration ();
|
||||
InstallExcludeRules ();
|
||||
|
||||
SparkleHelpers.DebugInfo ("Git", "[" + TargetFolder + "] Repository cloned");
|
||||
|
@ -101,9 +101,7 @@ namespace SparkleLib {
|
|||
}
|
||||
|
||||
|
||||
// Install the user's name and email into
|
||||
// the newly cloned repository
|
||||
private void InstallUserInfo ()
|
||||
private void InstallConfiguration ()
|
||||
{
|
||||
|
||||
string global_config_file_path = SparkleHelpers.CombineMore (SparklePaths.SparkleConfigPath, "config");
|
||||
|
@ -116,11 +114,15 @@ namespace SparkleLib {
|
|||
|
||||
string repo_config_file_path = SparkleHelpers.CombineMore (TargetFolder, ".git", "config");
|
||||
|
||||
TextWriter writer = File.AppendText (repo_config_file_path);
|
||||
writer.WriteLine (user_info);
|
||||
string config = String.Join ("\n", File.ReadAllLines (repo_config_file_path));
|
||||
config = config.Replace ("ignorecase = true", "ignorecase = false");
|
||||
config += Environment.NewLine + user_info;
|
||||
|
||||
TextWriter writer = new StreamWriter (repo_config_file_path);
|
||||
writer.WriteLine (config);
|
||||
writer.Close ();
|
||||
|
||||
SparkleHelpers.DebugInfo ("Config", "Added user info to '" + repo_config_file_path + "'");
|
||||
SparkleHelpers.DebugInfo ("Config", "Added configuration to '" + repo_config_file_path + "'");
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue