mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Redo Reformat and cleanup.
Rider EAP was having a bug interpreting .editorconfig that didn't generate the code style as we wanted. This is now done with Rider-stable.
This commit is contained in:
@@ -47,8 +47,7 @@ public sealed partial class XboxFatPlugin
|
||||
if(!_mounted)
|
||||
return ErrorNumber.AccessDenied;
|
||||
|
||||
if(string.IsNullOrWhiteSpace(path) ||
|
||||
path == "/")
|
||||
if(string.IsNullOrWhiteSpace(path) || path == "/")
|
||||
{
|
||||
node = new FatxDirNode
|
||||
{
|
||||
@@ -74,7 +73,10 @@ public sealed partial class XboxFatPlugin
|
||||
return ErrorNumber.NoError;
|
||||
}
|
||||
|
||||
string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
}, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
KeyValuePair<string, DirectoryEntry> entry =
|
||||
_rootDirectory.FirstOrDefault(t => t.Key.ToLower(_cultureInfo) == pieces[0]);
|
||||
|
||||
@@ -103,6 +103,8 @@ public sealed partial class XboxFatPlugin : IReadOnlyFilesystem
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{ "debug", false.ToString() }
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -73,8 +73,7 @@ public sealed partial class XboxFatPlugin
|
||||
if(err != ErrorNumber.NoError)
|
||||
return err;
|
||||
|
||||
if(stat.Attributes.HasFlag(FileAttributes.Directory) &&
|
||||
!_debug)
|
||||
if(stat.Attributes.HasFlag(FileAttributes.Directory) && !_debug)
|
||||
return ErrorNumber.IsDirectory;
|
||||
|
||||
uint[] clusters = GetClusters((uint)stat.Inode);
|
||||
@@ -112,8 +111,7 @@ public sealed partial class XboxFatPlugin
|
||||
if(!_mounted)
|
||||
return ErrorNumber.AccessDenied;
|
||||
|
||||
if(buffer is null ||
|
||||
buffer.Length < length)
|
||||
if(buffer is null || buffer.Length < length)
|
||||
return ErrorNumber.InvalidArgument;
|
||||
|
||||
if(node is not FatxFileNode mynode)
|
||||
@@ -249,8 +247,7 @@ public sealed partial class XboxFatPlugin
|
||||
|
||||
if(_fat16 is null)
|
||||
{
|
||||
while((nextCluster & FAT32_MASK) > 0 &&
|
||||
(nextCluster & FAT32_MASK) <= FAT32_RESERVED)
|
||||
while((nextCluster & FAT32_MASK) > 0 && (nextCluster & FAT32_MASK) <= FAT32_RESERVED)
|
||||
{
|
||||
clusters.Add(nextCluster);
|
||||
nextCluster = _fat32[nextCluster];
|
||||
@@ -274,7 +271,10 @@ public sealed partial class XboxFatPlugin
|
||||
|
||||
string cutPath = path.StartsWith('/') ? path[1..].ToLower(_cultureInfo) : path.ToLower(_cultureInfo);
|
||||
|
||||
string[] pieces = cutPath.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pieces = cutPath.Split(new[]
|
||||
{
|
||||
'/'
|
||||
}, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if(pieces.Length == 0)
|
||||
return ErrorNumber.InvalidArgument;
|
||||
|
||||
@@ -90,7 +90,8 @@ public sealed partial class XboxFatPlugin
|
||||
sb.AppendLine(Localization.FATX_filesystem);
|
||||
|
||||
sb.AppendFormat(Localization._0_logical_sectors_1_bytes_per_physical_sector, logicalSectorsPerPhysicalSectors,
|
||||
logicalSectorsPerPhysicalSectors * imagePlugin.Info.SectorSize).AppendLine();
|
||||
logicalSectorsPerPhysicalSectors * imagePlugin.Info.SectorSize).
|
||||
AppendLine();
|
||||
|
||||
sb.AppendFormat(Localization._0_sectors_1_bytes_per_cluster, fatxSb.sectorsPerCluster,
|
||||
fatxSb.sectorsPerCluster * logicalSectorsPerPhysicalSectors * imagePlugin.Info.SectorSize).
|
||||
@@ -109,7 +110,8 @@ public sealed partial class XboxFatPlugin
|
||||
metadata = new FileSystem
|
||||
{
|
||||
Type = FS_TYPE,
|
||||
ClusterSize = (uint)(fatxSb.sectorsPerCluster * logicalSectorsPerPhysicalSectors *
|
||||
ClusterSize = (uint)(fatxSb.sectorsPerCluster *
|
||||
logicalSectorsPerPhysicalSectors *
|
||||
imagePlugin.Info.SectorSize),
|
||||
VolumeName = volumeLabel,
|
||||
VolumeSerial = $"{fatxSb.id:X8}"
|
||||
|
||||
@@ -96,7 +96,8 @@ public sealed partial class XboxFatPlugin
|
||||
Metadata = new FileSystem
|
||||
{
|
||||
Type = Localization.FATX_filesystem,
|
||||
ClusterSize = (uint)(_superblock.sectorsPerCluster * logicalSectorsPerPhysicalSectors *
|
||||
ClusterSize = (uint)(_superblock.sectorsPerCluster *
|
||||
logicalSectorsPerPhysicalSectors *
|
||||
imagePlugin.Info.SectorSize),
|
||||
VolumeName = volumeLabel,
|
||||
VolumeSerial = $"{_superblock.id:X8}"
|
||||
|
||||
Reference in New Issue
Block a user