Fixed migration for 2.0.0
This commit is contained in:
@@ -259,6 +259,9 @@ public sealed class CacheMonitor : DisposableMediatorSubscriberBase
|
||||
|
||||
private CancellationTokenSource _penumbraFswCts = new();
|
||||
private CancellationTokenSource _lightlessFswCts = new();
|
||||
private long totalSize;
|
||||
private long maxCacheBytes;
|
||||
|
||||
public FileSystemWatcher? PenumbraWatcher { get; private set; }
|
||||
public FileSystemWatcher? LightlessWatcher { get; private set; }
|
||||
|
||||
@@ -485,7 +488,7 @@ public sealed class CacheMonitor : DisposableMediatorSubscriberBase
|
||||
{
|
||||
long size = 0;
|
||||
|
||||
if (!isWine)
|
||||
if (!_dalamudUtil.IsWine)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -17,7 +17,6 @@ public sealed partial class FileCompactor : IDisposable
|
||||
public const uint FSCTL_DELETE_EXTERNAL_BACKING = 0x90314U;
|
||||
public const ulong WOF_PROVIDER_FILE = 2UL;
|
||||
public const int _maxRetries = 3;
|
||||
private readonly bool _isWindows;
|
||||
|
||||
private readonly ConcurrentDictionary<string, byte> _pendingCompactions;
|
||||
private readonly ILogger<FileCompactor> _logger;
|
||||
@@ -272,9 +271,6 @@ public sealed partial class FileCompactor : IDisposable
|
||||
? RunProcessShell($"stat -c='%b' {QuoteSingle(linuxPath)}", workingDir: null, 10000)
|
||||
: RunProcessDirect("stat", ["-c='%b'", linuxPath], workingDir: null, 10000);
|
||||
|
||||
if (_logger.IsEnabled(LogLevel.Debug))
|
||||
_logger.LogDebug("Btrfs size probe failed for {linux} (exit {code}). stdout='{so}' stderr='{se}'. Falling back to Length.", linuxPath, res.code, outTrim, (res.se ?? "").Trim());
|
||||
|
||||
return (flowControl: false, value: fileInfo.Length);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1160,6 +1156,11 @@ public sealed partial class FileCompactor : IDisposable
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogTrace(ex, "Probe open failed for {file} (linux={linux})", winePath, linuxPath);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user