Merge pull request #1965 from markusstoll/master

Fix problem on renaming HEAD file
This commit is contained in:
Hylke Bons 2021-02-15 10:33:06 +01:00 committed by GitHub
commit 948e14fe5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -934,7 +934,12 @@ namespace Sparkles.Git {
string HEAD_file_path = Path.Combine (child_path, "HEAD");
if (File.Exists (HEAD_file_path)) {
File.Move (HEAD_file_path, HEAD_file_path + ".backup");
string HEAD_file_path_backup = Path.Combine (child_path, "HEAD.backup");
if (File.Exists (HEAD_file_path_backup)) {
File.Delete (HEAD_file_path_backup);
}
File.Move (HEAD_file_path, HEAD_file_path_backup);
Logger.LogInfo ("Git", Name + " | Renamed " + HEAD_file_path);
}