mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
fix<Command>: fix crash when cancel a process that already
This commit is contained in:
parent
17e9ce2a2f
commit
e7a7c0518e
1 changed files with 7 additions and 8 deletions
|
@ -79,9 +79,9 @@ namespace SourceGit.Commands {
|
|||
proc.CancelErrorRead();
|
||||
proc.CancelOutputRead();
|
||||
#if NET48
|
||||
proc.Kill();
|
||||
if (!proc.HasExited) proc.Kill();
|
||||
#else
|
||||
proc.Kill(true);
|
||||
if (!proc.HasExited) proc.Kill(true);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
@ -95,17 +95,16 @@ namespace SourceGit.Commands {
|
|||
proc.CancelErrorRead();
|
||||
proc.CancelOutputRead();
|
||||
#if NET48
|
||||
proc.Kill();
|
||||
if (!proc.HasExited) proc.Kill();
|
||||
#else
|
||||
proc.Kill(true);
|
||||
if (!proc.HasExited) proc.Kill(true);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Data == null) return;
|
||||
if (TraitErrorAsOutput) OnReadline(e.Data);
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(e.Data)) return;
|
||||
if (TraitErrorAsOutput) OnReadline(e.Data);
|
||||
|
||||
if (progressFilter.IsMatch(e.Data)) return;
|
||||
if (e.Data.StartsWith("remote: Counting objects:", StringComparison.Ordinal)) return;
|
||||
errs.Add(e.Data);
|
||||
|
|
Loading…
Reference in a new issue