fix: must convert the relative path to absolute before send it to first instance (#1376)
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-31 21:26:01 +08:00
parent dd432c63e8
commit db5bb0aec9
No known key found for this signature in database
3 changed files with 14 additions and 4 deletions

View file

@ -393,7 +393,17 @@ namespace SourceGit
_ipcChannel = new Models.IpcChannel();
if (!_ipcChannel.IsFirstInstance)
{
_ipcChannel.SendToFirstInstance(desktop.Args is { Length: 1 } ? desktop.Args[0] : string.Empty);
var arg = desktop.Args is { Length: > 0 } ? desktop.Args[0].Trim() : string.Empty;
if (!string.IsNullOrEmpty(arg))
{
if (arg.StartsWith('"') && arg.EndsWith('"'))
arg = arg.Substring(1, arg.Length - 2).Trim();
if (arg.Length > 0 && !Path.IsPathFullyQualified(arg))
arg = Path.GetFullPath(arg);
}
_ipcChannel.SendToFirstInstance(arg);
Environment.Exit(0);
}
else

View file

@ -220,12 +220,12 @@ namespace SourceGit.Models
public void Complete()
{
_users.Clear();
All.Complete();
Month.Complete();
Week.Complete();
}
private readonly DateTime _thisMonthStart;
private readonly DateTime _thisWeekStart;
private readonly Dictionary<string, User> _users = new();

View file

@ -135,7 +135,7 @@ namespace SourceGit.Views
else
{
ToolTip.SetTip(this, TIPS[(int)c.Index]);
}
}
InvalidateVisual();
}