mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
make mount truely syncronous
This commit is contained in:
1 parent
6ebd3063ed
commit
0f355bc2fc
4 files changed
+26
-6
No files matched your search
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user