code_style: remove all IDE warnings

This commit is contained in:
leo 2024-07-15 00:30:31 +08:00
parent 24ca3eaf8c
commit f4eca45754
No known key found for this signature in database
79 changed files with 1462 additions and 1378 deletions

View file

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Threading.Tasks;
@ -105,8 +106,8 @@ namespace SourceGit.ViewModels
}
else
{
var name = Path.GetFileName(_remote);
if (name.EndsWith(".git"))
var name = Path.GetFileName(_remote)!;
if (name.EndsWith(".git", StringComparison.Ordinal))
name = name.Substring(0, name.Length - 4);
path = Path.GetFullPath(Path.Combine(path, name));
}