fix: crach while submodule changed (#881)
Some checks failed
Continuous Integration / Build (push) Has been cancelled
Continuous Integration / Prepare version string (push) Has been cancelled
Localization Check / localization-check (push) Has been cancelled
Continuous Integration / Package (push) Has been cancelled

This commit is contained in:
leo 2025-01-08 12:41:50 +08:00
parent eea3d5db6c
commit 5d791b63bf
No known key found for this signature in database

View file

@ -174,7 +174,7 @@ namespace SourceGit.Models
{
_updateBranch = DateTime.Now.AddSeconds(.5).ToFileTime();
lock (_submodules)
lock (_lockSubmodule)
{
if (_submodules.Count > 0)
_updateSubmodules = DateTime.Now.AddSeconds(1).ToFileTime();
@ -195,7 +195,7 @@ namespace SourceGit.Models
if (name == ".git" || name.StartsWith(".git/", StringComparison.Ordinal))
return;
lock (_submodules)
lock (_lockSubmodule)
{
foreach (var submodule in _submodules)
{