mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
wtf did I push last time
This commit is contained in:
parent
e942a1913b
commit
925bf7e6c6
2 changed files with 4 additions and 5 deletions
|
|
@ -69,7 +69,7 @@ public sealed class FileCompactor
|
||||||
{
|
{
|
||||||
bool ntfs = isNTFS ?? string.Equals(new DriveInfo(new FileInfo(filePath).Directory!.Root.FullName).DriveFormat, "NTFS", StringComparison.OrdinalIgnoreCase);
|
bool ntfs = isNTFS ?? string.Equals(new DriveInfo(new FileInfo(filePath).Directory!.Root.FullName).DriveFormat, "NTFS", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
if (_dalamudUtilService.IsWine.Value || !ntfs) return new FileInfo(filePath).Length;
|
if (_dalamudUtilService.IsWine || !ntfs) return new FileInfo(filePath).Length;
|
||||||
|
|
||||||
var clusterSize = GetClusterSize(filePath);
|
var clusterSize = GetClusterSize(filePath);
|
||||||
if (clusterSize == -1) return new FileInfo(filePath).Length;
|
if (clusterSize == -1) return new FileInfo(filePath).Length;
|
||||||
|
|
@ -82,7 +82,7 @@ public sealed class FileCompactor
|
||||||
{
|
{
|
||||||
await File.WriteAllBytesAsync(filePath, decompressedFile, token).ConfigureAwait(false);
|
await File.WriteAllBytesAsync(filePath, decompressedFile, token).ConfigureAwait(false);
|
||||||
|
|
||||||
if (_dalamudUtilService.IsWine.Value || !_mareConfigService.Current.UseCompactor)
|
if (_dalamudUtilService.IsWine || !_mareConfigService.Current.UseCompactor)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -567,8 +567,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||||
_ = Task.Run(() =>
|
_ = Task.Run(() =>
|
||||||
{
|
{
|
||||||
_fileCompactor.CompactStorage(compress: true);
|
_fileCompactor.CompactStorage(compress: true);
|
||||||
CancellationTokenSource cts = new();
|
_cacheMonitor.RecalculateFileCacheSize(CancellationToken.None);
|
||||||
_cacheMonitor.RecalculateFileCacheSize(cts.Token);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
UiSharedService.AttachToolTip("This will run compression on all files in your current Mare Storage." + Environment.NewLine
|
UiSharedService.AttachToolTip("This will run compression on all files in your current Mare Storage." + Environment.NewLine
|
||||||
|
|
@ -580,7 +579,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||||
{
|
{
|
||||||
_fileCompactor.CompactStorage(compress: false);
|
_fileCompactor.CompactStorage(compress: false);
|
||||||
CancellationTokenSource cts = new();
|
CancellationTokenSource cts = new();
|
||||||
_cacheMonitor.RecalculateFileCacheSize(cts.Token);
|
_cacheMonitor.RecalculateFileCacheSize(CancellationToken.None);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
UiSharedService.AttachToolTip("This will run decompression on all files in your current Mare Storage.");
|
UiSharedService.AttachToolTip("This will run decompression on all files in your current Mare Storage.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue