From 5d791b63bf15d819549690e5ced50305943aeef3 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 8 Jan 2025 12:41:50 +0800 Subject: [PATCH] fix: crach while submodule changed (#881) --- src/Models/Watcher.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Watcher.cs b/src/Models/Watcher.cs index 710b307d..c63f0e55 100644 --- a/src/Models/Watcher.cs +++ b/src/Models/Watcher.cs @@ -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) {