make mount truely syncronous

This commit is contained in:
TrèsAbhi committed 2026-02-02 18:07:20 -06:00
1 parent 6ebd3063ed
commit 0f355bc2fc
4 files changed
+26 -6

No files matched your search

+9 -3
View File
@@ -15,9 +15,10 @@ public class SynchronousFileProvider(
public new int Mount()
{
var countNewMounts = 0;
foreach (var reader in _unloadedVfs.Keys)
{
// VerifyGlobalData(reader);
if (reader.IsEncrypted && CustomEncryption == null || !reader.HasDirectoryIndex)
continue;
@@ -25,9 +26,14 @@ public class SynchronousFileProvider(
{
reader.MountTo(Files, PathComparer);
_unloadedVfs.TryRemove(reader, out _);
countNewMounts++;
_mountedVfs[reader] = null;
Interlocked.Increment(ref countNewMounts);
// return reader;
}
catch (InvalidAesKeyException)
{
// Ignore this
}
catch (InvalidAesKeyException) { }
catch (Exception e)
{
Log.Warning(