mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Refactor] Invert if to reduce nesting.
This commit is contained in:
@@ -270,14 +270,13 @@ public class PluginRegister
|
|||||||
|
|
||||||
var foundFilter = (IFilter)filter.GetType().GetConstructor(Type.EmptyTypes)?.Invoke([]);
|
var foundFilter = (IFilter)filter.GetType().GetConstructor(Type.EmptyTypes)?.Invoke([]);
|
||||||
|
|
||||||
if(foundFilter?.Open(path) == ErrorNumber.NoError)
|
if(foundFilter?.Open(path) != ErrorNumber.NoError) continue;
|
||||||
{
|
|
||||||
transaction.Finish();
|
transaction.Finish();
|
||||||
|
|
||||||
return foundFilter;
|
return foundFilter;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
noFilter = filter;
|
noFilter = filter;
|
||||||
}
|
}
|
||||||
catch(IOException ex)
|
catch(IOException ex)
|
||||||
|
|||||||
@@ -130,13 +130,12 @@ public partial class LzdStream : Stream
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(status == LZDStatus.DONE)
|
if(status != LZDStatus.DONE) continue;
|
||||||
{
|
|
||||||
_eof = true;
|
_eof = true;
|
||||||
Debug.WriteLine(">>> SET _eof=true (no more data and already flushed)");
|
Debug.WriteLine(">>> SET _eof=true (no more data and already flushed)");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
// if OK but no bytes, loop again
|
// if OK but no bytes, loop again
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1042,16 +1042,16 @@ partial class Dump
|
|||||||
|
|
||||||
sectorStatus[b] = SectorStatus.Dumped;
|
sectorStatus[b] = SectorStatus.Dumped;
|
||||||
|
|
||||||
if(inData && _paranoia)
|
if(!inData || !_paranoia) continue;
|
||||||
{
|
|
||||||
// Check valid sector
|
// Check valid sector
|
||||||
CdChecksums.CheckCdSector(sector,
|
CdChecksums.CheckCdSector(sector,
|
||||||
out bool? correctEccP,
|
out bool? correctEccP,
|
||||||
out bool? correctEccQ,
|
out bool? correctEccQ,
|
||||||
out bool? correctEdc);
|
out bool? correctEdc);
|
||||||
|
|
||||||
if(correctEdc != true || correctEccP != true || correctEccQ != true)
|
if(correctEdc == true && correctEccP == true && correctEccQ == true) continue;
|
||||||
{
|
|
||||||
sectorStatus[b] = SectorStatus.Errored;
|
sectorStatus[b] = SectorStatus.Errored;
|
||||||
_resume.BadBlocks.Add(i + (ulong)b);
|
_resume.BadBlocks.Add(i + (ulong)b);
|
||||||
|
|
||||||
@@ -1064,8 +1064,6 @@ partial class Dump
|
|||||||
if(correctEccQ != true)
|
if(correctEccQ != true)
|
||||||
UpdateStatus?.Invoke(string.Format(UI.Incorrect_ECC_Q_in_sector_0, i + (ulong)b));
|
UpdateStatus?.Invoke(string.Format(UI.Incorrect_ECC_Q_in_sector_0, i + (ulong)b));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(supportsLongSectors)
|
if(supportsLongSectors)
|
||||||
outputFormat.WriteSectorsLong(data, i, false, blocksToRead, sectorStatus);
|
outputFormat.WriteSectorsLong(data, i, false, blocksToRead, sectorStatus);
|
||||||
|
|||||||
@@ -206,14 +206,13 @@ public sealed partial class MediaScan
|
|||||||
ibgLog.Write(i, 0);
|
ibgLog.Write(i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(accumulatedSpeedMs >= 100)
|
if(accumulatedSpeedMs < 100) continue;
|
||||||
{
|
|
||||||
currentSpeed = accumulatedSpeedSectors * blockSize / (1048576 * (accumulatedSpeedMs / 1000.0));
|
currentSpeed = accumulatedSpeedSectors * blockSize / (1048576 * (accumulatedSpeedMs / 1000.0));
|
||||||
ScanSpeed?.Invoke(i, currentSpeed * 1024);
|
ScanSpeed?.Invoke(i, currentSpeed * 1024);
|
||||||
accumulatedSpeedMs = 0;
|
accumulatedSpeedMs = 0;
|
||||||
accumulatedSpeedSectors = 0;
|
accumulatedSpeedSectors = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
_speedStopwatch.Stop();
|
_speedStopwatch.Stop();
|
||||||
_scanStopwatch.Stop();
|
_scanStopwatch.Stop();
|
||||||
@@ -341,11 +340,9 @@ public sealed partial class MediaScan
|
|||||||
ibgLog.Write(currentBlock, 0);
|
ibgLog.Write(currentBlock, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(accumulatedSpeedMs >= 100)
|
if(accumulatedSpeedMs < 100) continue;
|
||||||
{
|
|
||||||
currentSpeed = accumulatedSpeedSectors *
|
currentSpeed = accumulatedSpeedSectors * blockSize / (1048576 * (accumulatedSpeedMs / 1000.0));
|
||||||
blockSize /
|
|
||||||
(1048576 * (accumulatedSpeedMs / 1000.0));
|
|
||||||
|
|
||||||
ScanSpeed?.Invoke(currentBlock, currentSpeed * 1024);
|
ScanSpeed?.Invoke(currentBlock, currentSpeed * 1024);
|
||||||
accumulatedSpeedMs = 0;
|
accumulatedSpeedMs = 0;
|
||||||
@@ -353,7 +350,6 @@ public sealed partial class MediaScan
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
_speedStopwatch.Stop();
|
_speedStopwatch.Stop();
|
||||||
_scanStopwatch.Stop();
|
_scanStopwatch.Stop();
|
||||||
|
|||||||
@@ -508,14 +508,13 @@ public sealed partial class MediaScan
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(accumulatedSpeedMs >= 100)
|
if(accumulatedSpeedMs < 100) continue;
|
||||||
{
|
|
||||||
currentSpeed = accumulatedSpeedSectors * blockSize / (1048576 * (accumulatedSpeedMs / 1000.0));
|
currentSpeed = accumulatedSpeedSectors * blockSize / (1048576 * (accumulatedSpeedMs / 1000.0));
|
||||||
ScanSpeed?.Invoke(i, currentSpeed * 1024);
|
ScanSpeed?.Invoke(i, currentSpeed * 1024);
|
||||||
accumulatedSpeedMs = 0;
|
accumulatedSpeedMs = 0;
|
||||||
accumulatedSpeedSectors = 0;
|
accumulatedSpeedSectors = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
_scanStopwatch.Stop();
|
_scanStopwatch.Stop();
|
||||||
EndProgress?.Invoke();
|
EndProgress?.Invoke();
|
||||||
@@ -624,14 +623,12 @@ public sealed partial class MediaScan
|
|||||||
ibgLog.Write(i, 0);
|
ibgLog.Write(i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(accumulatedSpeedMs >= 100)
|
if(accumulatedSpeedMs < 100) continue;
|
||||||
{
|
|
||||||
currentSpeed = accumulatedSpeedSectors * blockSize / (1048576 * (accumulatedSpeedMs / 1000.0));
|
currentSpeed = accumulatedSpeedSectors * blockSize / (1048576 * (accumulatedSpeedMs / 1000.0));
|
||||||
ScanSpeed?.Invoke(i, currentSpeed * 1024);
|
ScanSpeed?.Invoke(i, currentSpeed * 1024);
|
||||||
accumulatedSpeedMs = 0;
|
accumulatedSpeedMs = 0;
|
||||||
accumulatedSpeedSectors = 0;
|
accumulatedSpeedSectors = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
_scanStopwatch.Stop();
|
_scanStopwatch.Stop();
|
||||||
EndProgress?.Invoke();
|
EndProgress?.Invoke();
|
||||||
|
|||||||
@@ -343,14 +343,13 @@ public sealed partial class MediaScan
|
|||||||
ibgLog.Write(i, 0);
|
ibgLog.Write(i, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(accumulatedSpeedMs >= 100)
|
if(accumulatedSpeedMs < 100) continue;
|
||||||
{
|
|
||||||
currentSpeed = accumulatedSpeedSectors * blockSize / (1048576 * (accumulatedSpeedMs / 1000.0));
|
currentSpeed = accumulatedSpeedSectors * blockSize / (1048576 * (accumulatedSpeedMs / 1000.0));
|
||||||
ScanSpeed?.Invoke(i, currentSpeed * 1024);
|
ScanSpeed?.Invoke(i, currentSpeed * 1024);
|
||||||
accumulatedSpeedMs = 0;
|
accumulatedSpeedMs = 0;
|
||||||
accumulatedSpeedSectors = 0;
|
accumulatedSpeedSectors = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
_scanStopwatch.Stop();
|
_scanStopwatch.Stop();
|
||||||
EndProgress?.Invoke();
|
EndProgress?.Invoke();
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public static class DI
|
|||||||
Reserved2 = DIResponse[3]
|
Reserved2 = DIResponse[3]
|
||||||
};
|
};
|
||||||
|
|
||||||
int offset = 4;
|
var offset = 4;
|
||||||
List<DiscInformationUnits> units = [];
|
List<DiscInformationUnits> units = [];
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
@@ -232,7 +232,7 @@ public static class DI
|
|||||||
|
|
||||||
decoded.Units = new DiscInformationUnits[units.Count];
|
decoded.Units = new DiscInformationUnits[units.Count];
|
||||||
|
|
||||||
for(int i = 0; i < units.Count; i++) decoded.Units[i] = units[i];
|
for(var i = 0; i < units.Count; i++) decoded.Units[i] = units[i];
|
||||||
|
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
@@ -425,13 +425,11 @@ public static class DI
|
|||||||
sb.AppendFormat(Localization.Disc_product_revision_number_0, unit.ProductRevisionNumber).AppendLine();
|
sb.AppendFormat(Localization.Disc_product_revision_number_0, unit.ProductRevisionNumber).AppendLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(unit.FormatDependentContents is not null)
|
if(unit.FormatDependentContents is null) continue;
|
||||||
{
|
|
||||||
sb.AppendLine(Localization.Blu_ray_DI_Unit_format_dependent_contents_as_hex_follows);
|
sb.AppendLine(Localization.Blu_ray_DI_Unit_format_dependent_contents_as_hex_follows);
|
||||||
|
|
||||||
sb.AppendLine(Markup.Escape(PrintHex.ByteArrayToHexArrayString(unit.FormatDependentContents,
|
sb.AppendLine(Markup.Escape(PrintHex.ByteArrayToHexArrayString(unit.FormatDependentContents, color: true)));
|
||||||
color: true)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
|
|||||||
@@ -106,12 +106,11 @@ public partial class BlockMap : UserControl
|
|||||||
|
|
||||||
_sectorData = change.GetNewValue<ObservableCollection<(ulong startingSector, double duration)>>();
|
_sectorData = change.GetNewValue<ObservableCollection<(ulong startingSector, double duration)>>();
|
||||||
|
|
||||||
if(_sectorData != null)
|
if(_sectorData == null) return;
|
||||||
{
|
|
||||||
_sectorData.CollectionChanged += OnSectorDataChanged;
|
_sectorData.CollectionChanged += OnSectorDataChanged;
|
||||||
RedrawAll();
|
RedrawAll();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if(change.Property == ScanBlockSizeProperty)
|
else if(change.Property == ScanBlockSizeProperty)
|
||||||
{
|
{
|
||||||
_scanBlockSize = change.GetNewValue<uint>();
|
_scanBlockSize = change.GetNewValue<uint>();
|
||||||
@@ -136,12 +135,13 @@ public partial class BlockMap : UserControl
|
|||||||
void EnsureBitmap()
|
void EnsureBitmap()
|
||||||
{
|
{
|
||||||
if(_blocksPerRow <= 0 || _rows <= 0) return;
|
if(_blocksPerRow <= 0 || _rows <= 0) return;
|
||||||
|
|
||||||
int blockWithSpacing = BlockSize + BlockSpacing;
|
int blockWithSpacing = BlockSize + BlockSpacing;
|
||||||
int width = _blocksPerRow * blockWithSpacing;
|
int width = _blocksPerRow * blockWithSpacing;
|
||||||
int height = _rows * blockWithSpacing;
|
int height = _rows * blockWithSpacing;
|
||||||
|
|
||||||
if(_bitmap == null || _bitmap.PixelSize.Width != width || _bitmap.PixelSize.Height != height)
|
if(_bitmap != null && _bitmap.PixelSize.Width == width && _bitmap.PixelSize.Height == height) return;
|
||||||
{
|
|
||||||
_bitmap?.Dispose();
|
_bitmap?.Dispose();
|
||||||
|
|
||||||
_bitmap = new WriteableBitmap(new PixelSize(width, height),
|
_bitmap = new WriteableBitmap(new PixelSize(width, height),
|
||||||
@@ -149,14 +149,12 @@ public partial class BlockMap : UserControl
|
|||||||
PixelFormat.Bgra8888,
|
PixelFormat.Bgra8888,
|
||||||
AlphaFormat.Premul);
|
AlphaFormat.Premul);
|
||||||
|
|
||||||
if(_image != null)
|
if(_image == null) return;
|
||||||
{
|
|
||||||
_image.Source = _bitmap;
|
_image.Source = _bitmap;
|
||||||
_image.Width = width;
|
_image.Width = width;
|
||||||
_image.Height = height;
|
_image.Height = height;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RedrawAll()
|
private void RedrawAll()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -183,23 +183,21 @@ public partial class DiscSpeedGraph : UserControl
|
|||||||
{
|
{
|
||||||
double newZoom = Math.Min(_yZoomLevel + ZOOM_STEP, MAX_ZOOM);
|
double newZoom = Math.Min(_yZoomLevel + ZOOM_STEP, MAX_ZOOM);
|
||||||
|
|
||||||
if(Math.Abs(newZoom - _yZoomLevel) > 0.001)
|
if(!(Math.Abs(newZoom - _yZoomLevel) > 0.001)) return;
|
||||||
{
|
|
||||||
_yZoomLevel = newZoom;
|
_yZoomLevel = newZoom;
|
||||||
RedrawAll();
|
RedrawAll();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void ZoomOut()
|
void ZoomOut()
|
||||||
{
|
{
|
||||||
double newZoom = Math.Max(_yZoomLevel - ZOOM_STEP, MIN_ZOOM);
|
double newZoom = Math.Max(_yZoomLevel - ZOOM_STEP, MIN_ZOOM);
|
||||||
|
|
||||||
if(Math.Abs(newZoom - _yZoomLevel) > 0.001)
|
if(!(Math.Abs(newZoom - _yZoomLevel) > 0.001)) return;
|
||||||
{
|
|
||||||
_yZoomLevel = newZoom;
|
_yZoomLevel = newZoom;
|
||||||
RedrawAll();
|
RedrawAll();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void OnPointerWheelChanged(object sender, PointerWheelEventArgs e)
|
void OnPointerWheelChanged(object sender, PointerWheelEventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -488,8 +488,8 @@ public partial class SpectreTextBlock : TextBlock
|
|||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
if(i < text.Length && text[i] == ']')
|
if(i >= text.Length || text[i] != ']') continue;
|
||||||
{
|
|
||||||
// Found [/], close the most recent tag
|
// Found [/], close the most recent tag
|
||||||
if(tagStack.Count > 0)
|
if(tagStack.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -497,9 +497,6 @@ public partial class SpectreTextBlock : TextBlock
|
|||||||
int closeTagEnd = i + 1; // After the ']' of [/]
|
int closeTagEnd = i + 1; // After the ']' of [/]
|
||||||
result.Add(new MarkupTag(openStart, closeTagEnd, tag, openTagEnd, tagStart));
|
result.Add(new MarkupTag(openStart, closeTagEnd, tag, openTagEnd, tagStart));
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -516,13 +513,11 @@ public partial class SpectreTextBlock : TextBlock
|
|||||||
int openTagEnd = i + 1; // After the ']'
|
int openTagEnd = i + 1; // After the ']'
|
||||||
tagStack.Push((tagStart, openTagEnd, tagName));
|
tagStack.Push((tagStart, openTagEnd, tagName));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,9 @@ public partial class DeviceView : Window
|
|||||||
{
|
{
|
||||||
base.OnDataContextChanged(e);
|
base.OnDataContextChanged(e);
|
||||||
|
|
||||||
if(DataContext is DeviceViewModel vm)
|
if(DataContext is not DeviceViewModel vm) return;
|
||||||
{
|
|
||||||
Closed += (_, _) => vm?.Closed();
|
Closed += (_, _) => vm?.Closed();
|
||||||
vm?.LoadData();
|
vm?.LoadData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -485,8 +485,8 @@ public partial class SpectreTextBlock : TextBlock
|
|||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
if(i < text.Length && text[i] == ']')
|
if(i >= text.Length || text[i] != ']') continue;
|
||||||
{
|
|
||||||
// Found [/], close the most recent tag
|
// Found [/], close the most recent tag
|
||||||
if(tagStack.Count > 0)
|
if(tagStack.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -494,9 +494,6 @@ public partial class SpectreTextBlock : TextBlock
|
|||||||
int closeTagEnd = i + 1; // After the ']' of [/]
|
int closeTagEnd = i + 1; // After the ']' of [/]
|
||||||
result.Add(new MarkupTag(openStart, closeTagEnd, tag, openTagEnd, tagStart));
|
result.Add(new MarkupTag(openStart, closeTagEnd, tag, openTagEnd, tagStart));
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -513,13 +510,11 @@ public partial class SpectreTextBlock : TextBlock
|
|||||||
int openTagEnd = i + 1; // After the ']'
|
int openTagEnd = i + 1; // After the ']'
|
||||||
tagStack.Push((tagStart, openTagEnd, tagName));
|
tagStack.Push((tagStart, openTagEnd, tagName));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,15 +40,12 @@ public partial class FileView : UserControl
|
|||||||
|
|
||||||
private void ListBox_OnKeyDown(object sender, KeyEventArgs e)
|
private void ListBox_OnKeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if(e.Key == Key.Enter)
|
if(e.Key != Key.Enter) return;
|
||||||
{
|
if(DataContext is not FileViewViewModel vm || !vm.OpenSelectedFileCommand.CanExecute(null)) return;
|
||||||
if(DataContext is FileViewViewModel vm && vm.OpenSelectedFileCommand.CanExecute(null))
|
|
||||||
{
|
|
||||||
vm.OpenSelectedFileCommand.Execute(null);
|
vm.OpenSelectedFileCommand.Execute(null);
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void OnDataContextChanged(EventArgs e)
|
protected override void OnDataContextChanged(EventArgs e)
|
||||||
|
|||||||
@@ -390,11 +390,10 @@ sealed class StatisticsCommand : AsyncCommand<StatisticsCommand.Settings>
|
|||||||
AaruLogging.WriteLine();
|
AaruLogging.WriteLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!thereAreStats)
|
if(thereAreStats) return (int)ErrorNumber.NoError;
|
||||||
{
|
|
||||||
AaruLogging.WriteLine(UI.There_are_no_statistics);
|
AaruLogging.WriteLine(UI.There_are_no_statistics);
|
||||||
AaruLogging.Information(UI.There_are_no_statistics);
|
AaruLogging.Information(UI.There_are_no_statistics);
|
||||||
}
|
|
||||||
|
|
||||||
return (int)ErrorNumber.NoError;
|
return (int)ErrorNumber.NoError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -414,14 +414,13 @@ sealed class LsCommand : Command<LsCommand.Settings>
|
|||||||
byte[] xattrBuf = [];
|
byte[] xattrBuf = [];
|
||||||
error = fs.GetXattr(path + "/" + entry.Key, xattr, ref xattrBuf);
|
error = fs.GetXattr(path + "/" + entry.Key, xattr, ref xattrBuf);
|
||||||
|
|
||||||
if(error == ErrorNumber.NoError)
|
if(error != ErrorNumber.NoError) continue;
|
||||||
{
|
|
||||||
table.AddRow("", $"[lime]{xattrBuf.Length}[/]", "", $"[fuchsia]{Markup.Escape(xattr)}[/]");
|
table.AddRow("", $"[lime]{xattrBuf.Length}[/]", "", $"[fuchsia]{Markup.Escape(xattr)}[/]");
|
||||||
|
|
||||||
AaruLogging.Information($"{xattrBuf.Length} {xattr}");
|
AaruLogging.Information($"{xattrBuf.Length} {xattr}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
table.AddRow("", "", "", $"[green]{Markup.Escape(entry.Key)}[/]");
|
table.AddRow("", "", "", $"[green]{Markup.Escape(entry.Key)}[/]");
|
||||||
|
|||||||
@@ -1397,16 +1397,13 @@ sealed class ConvertImageCommand : Command<ConvertImageCommand.Settings>
|
|||||||
return (false, 0, 0, 0);
|
return (false, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!uint.TryParse(geometryPieces[2], out uint sectors) || sectors == 0)
|
if(uint.TryParse(geometryPieces[2], out uint sectors) && sectors != 0) return (true, cylinders, heads, sectors);
|
||||||
{
|
|
||||||
AaruLogging.Error(UI.Invalid_sectors_per_track_specified);
|
AaruLogging.Error(UI.Invalid_sectors_per_track_specified);
|
||||||
|
|
||||||
return (false, 0, 0, 0);
|
return (false, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (true, cylinders, heads, sectors);
|
|
||||||
}
|
|
||||||
|
|
||||||
private (bool success, Metadata sidecar, Resume resume) LoadMetadata(
|
private (bool success, Metadata sidecar, Resume resume) LoadMetadata(
|
||||||
string aaruMetadataPath, string cicmXmlPath, string resumeFilePath)
|
string aaruMetadataPath, string cicmXmlPath, string resumeFilePath)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user