Standardizes boolean naming across the stack

This commit is contained in:
BinaryAlley committed 2026-09-26 10:12:12 +03:00
1 parent 6bd0cf6d42
commit 37dff6039d
78 files changed
+252 -252

No files matched your search

@@ -14,7 +14,7 @@ namespace Lumina.Infrastructure.Core.MediaLibrary.Management.Scanning.Cancellati
internal class MediaLibrariesScanCancellationTracker : IMediaLibrariesScanCancellationTracker, IDisposable
{
private readonly ConcurrentDictionary<MediaLibraryScanCompositeId, CancellationTokenSource> _runningScans = new();
private bool _disposed;
private bool _isDisposed;
/// <summary>
/// Registers a new scan operation for tracking.
@@ -72,7 +72,7 @@ internal class MediaLibrariesScanCancellationTracker : IMediaLibrariesScanCancel
/// </summary>
public void Dispose()
{
if (!_disposed)
if (!_isDisposed)
{
foreach (CancellationTokenSource scan in _runningScans.Values)
{
@@ -80,7 +80,7 @@ internal class MediaLibrariesScanCancellationTracker : IMediaLibrariesScanCancel
scan.Dispose();
}
_runningScans.Clear();
_disposed = true;
_isDisposed = true;
}
}
}
@@ -480,7 +480,7 @@ public sealed class ThemeService : IThemeService
if (unixFileType == 0xA000)
return PackageInvalid("Symbolic links are not allowed in theme archives.");
Result<string> normalizedPathResult = NormalizeRelativePath(entry.FullName, allowTrailingSlash: true);
Result<string> normalizedPathResult = NormalizeRelativePath(entry.FullName, shouldAllowTrailingSlash: true);
if (normalizedPathResult.IsFailure)
return normalizedPathResult.Errors;
@@ -732,14 +732,14 @@ public sealed class ThemeService : IThemeService
/// Normalizes a package-relative path, rejecting paths that escape the package or violate the path rules.
/// </summary>
/// <param name="path">The package-relative path to normalize.</param>
/// <param name="allowTrailingSlash">Whether a trailing slash, used for directory entries, is permitted.</param>
/// <param name="shouldAllowTrailingSlash">Whether a trailing slash, used for directory entries, is permitted.</param>
/// <returns>An <see cref="Result{TValue}"/> containing either the normalized path, or an error.</returns>
private Result<string> NormalizeRelativePath(string path, bool allowTrailingSlash = false)
private Result<string> NormalizeRelativePath(string path, bool shouldAllowTrailingSlash = false)
{
if (string.IsNullOrWhiteSpace(path) || path.Length > 240 || path.Contains('\\') || path.Contains('\0') || path.StartsWith('/') || path.Contains("//"))
return PackageInvalid("The theme contains an invalid path.");
string candidate = allowTrailingSlash ? path.TrimEnd('/') : path;
string candidate = shouldAllowTrailingSlash ? path.TrimEnd('/') : path;
if (string.IsNullOrWhiteSpace(candidate))
return PackageInvalid("The theme contains an invalid path.");