mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-06 19:44:58 +00:00
fix: must convert the relative path to absolute before send it to first instance (#1376)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
dd432c63e8
commit
db5bb0aec9
3 changed files with 14 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -135,7 +135,7 @@ namespace SourceGit.Views
|
|||
else
|
||||
{
|
||||
ToolTip.SetTip(this, TIPS[(int)c.Index]);
|
||||
}
|
||||
}
|
||||
|
||||
InvalidateVisual();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue