diff --git a/GVFS/GVFS.Common/GVFSLock.Shared.cs b/GVFS/GVFS.Common/GVFSLock.Shared.cs index 4f3fc5d7b..10785b445 100644 --- a/GVFS/GVFS.Common/GVFSLock.Shared.cs +++ b/GVFS/GVFS.Common/GVFSLock.Shared.cs @@ -81,13 +81,14 @@ public static bool TryAcquireGVFSLockForProcess( } }; + bool isSuccessfulLockResult; if (unattended) { - waitForLock(); + isSuccessfulLockResult = waitForLock(); } else { - ConsoleHelper.ShowStatusWhileRunning( + isSuccessfulLockResult = ConsoleHelper.ShowStatusWhileRunning( waitForLock, message, output: Console.Out, @@ -96,7 +97,7 @@ public static bool TryAcquireGVFSLockForProcess( } result = null; - return true; + return isSuccessfulLockResult; } public static void ReleaseGVFSLock( diff --git a/GVFS/GVFS.Virtualization/FileSystemCallbacks.cs b/GVFS/GVFS.Virtualization/FileSystemCallbacks.cs index 69973817a..906bad018 100644 --- a/GVFS/GVFS.Virtualization/FileSystemCallbacks.cs +++ b/GVFS/GVFS.Virtualization/FileSystemCallbacks.cs @@ -196,8 +196,11 @@ public void Stop() this.postFetchJobThread?.Abort(); } - this.fileSystemVirtualizer.PrepareToStop(); + // Shutdown the GitStatusCache before other + // components that it depends on. this.gitStatusCache.Shutdown(); + + this.fileSystemVirtualizer.PrepareToStop(); this.backgroundFileSystemTaskRunner.Shutdown(); this.GitIndexProjection.Shutdown(); this.BlobSizes.Shutdown();