mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Use preferred braces style.
This commit is contained in:
@@ -66,7 +66,6 @@ namespace DiscImageChef.Commands
|
||||
Encoding encoding = null;
|
||||
|
||||
if(options.EncodingName != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
encoding = Claunia.Encoding.Encoding.GetEncoding(options.EncodingName);
|
||||
@@ -78,7 +77,6 @@ namespace DiscImageChef.Commands
|
||||
encoding = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
PluginBase plugins = new PluginBase();
|
||||
plugins.RegisterAllPlugins(encoding);
|
||||
@@ -100,10 +98,8 @@ namespace DiscImageChef.Commands
|
||||
else
|
||||
{
|
||||
if(options.Verbose)
|
||||
{
|
||||
DicConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name,
|
||||
imageFormat.PluginUuid);
|
||||
}
|
||||
else DicConsole.WriteLine("Image format identified by {0}.", imageFormat.Name);
|
||||
}
|
||||
|
||||
@@ -165,7 +161,6 @@ namespace DiscImageChef.Commands
|
||||
DicConsole.WriteLine(string.Format("Identified by {0} plugins", idPlugins.Count));
|
||||
|
||||
foreach(string pluginName in idPlugins)
|
||||
{
|
||||
if(plugins.PluginsList.TryGetValue(pluginName, out plugin))
|
||||
{
|
||||
DicConsole.WriteLine(string.Format("As identified by {0}.", plugin.Name));
|
||||
@@ -181,7 +176,6 @@ namespace DiscImageChef.Commands
|
||||
List<string> rootDir = new List<string>();
|
||||
error = fs.ReadDir("/", ref rootDir);
|
||||
if(error == Errno.NoError)
|
||||
{
|
||||
foreach(string entry in rootDir)
|
||||
{
|
||||
FileEntryInfo stat = new FileEntryInfo();
|
||||
@@ -202,7 +196,6 @@ namespace DiscImageChef.Commands
|
||||
|
||||
error = fs.ListXAttr(entry, ref xattrs);
|
||||
if(error == Errno.NoError)
|
||||
{
|
||||
foreach(string xattr in xattrs)
|
||||
{
|
||||
byte[] xattrBuf = new byte[0];
|
||||
@@ -254,14 +247,11 @@ namespace DiscImageChef.Commands
|
||||
outputPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
||||
xattr, entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(Path.Combine(options.OutputDir,
|
||||
@@ -298,36 +288,26 @@ namespace DiscImageChef.Commands
|
||||
outBuf.Length, entry, outputPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Error {0} reading file {1}",
|
||||
error, entry);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("Cannot write file {0}, output exists",
|
||||
entry);
|
||||
}
|
||||
}
|
||||
else DicConsole.ErrorWriteLine("Error reading file {0}", entry);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}",
|
||||
error.ToString());
|
||||
}
|
||||
|
||||
Core.Statistics.AddFilesystem(fs.XmlFSType.Type);
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Unable to mount device, error {0}",
|
||||
error.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -344,7 +324,6 @@ namespace DiscImageChef.Commands
|
||||
List<string> rootDir = new List<string>();
|
||||
error = fs.ReadDir("/", ref rootDir);
|
||||
if(error == Errno.NoError)
|
||||
{
|
||||
foreach(string entry in rootDir)
|
||||
{
|
||||
FileEntryInfo stat = new FileEntryInfo();
|
||||
@@ -364,7 +343,6 @@ namespace DiscImageChef.Commands
|
||||
|
||||
error = fs.ListXAttr(entry, ref xattrs);
|
||||
if(error == Errno.NoError)
|
||||
{
|
||||
foreach(string xattr in xattrs)
|
||||
{
|
||||
byte[] xattrBuf = new byte[0];
|
||||
@@ -403,14 +381,11 @@ namespace DiscImageChef.Commands
|
||||
outputPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
||||
xattr, entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(Path.Combine(options.OutputDir, fs.XmlFSType.Type,
|
||||
@@ -445,20 +420,15 @@ namespace DiscImageChef.Commands
|
||||
outBuf.Length, entry, outputPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Error {0} reading file {1}", error,
|
||||
entry);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Cannot write file {0}, output exists",
|
||||
entry);
|
||||
}
|
||||
}
|
||||
else DicConsole.ErrorWriteLine("Error reading file {0}", entry);
|
||||
}
|
||||
}
|
||||
else
|
||||
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
||||
|
||||
@@ -483,7 +453,6 @@ namespace DiscImageChef.Commands
|
||||
DicConsole.WriteLine(string.Format("Identified by {0} plugins", idPlugins.Count));
|
||||
|
||||
foreach(string pluginName in idPlugins)
|
||||
{
|
||||
if(plugins.PluginsList.TryGetValue(pluginName, out plugin))
|
||||
{
|
||||
DicConsole.WriteLine(string.Format("As identified by {0}.", plugin.Name));
|
||||
@@ -498,7 +467,6 @@ namespace DiscImageChef.Commands
|
||||
List<string> rootDir = new List<string>();
|
||||
error = fs.ReadDir("/", ref rootDir);
|
||||
if(error == Errno.NoError)
|
||||
{
|
||||
foreach(string entry in rootDir)
|
||||
{
|
||||
FileEntryInfo stat = new FileEntryInfo();
|
||||
@@ -518,7 +486,6 @@ namespace DiscImageChef.Commands
|
||||
|
||||
error = fs.ListXAttr(entry, ref xattrs);
|
||||
if(error == Errno.NoError)
|
||||
{
|
||||
foreach(string xattr in xattrs)
|
||||
{
|
||||
byte[] xattrBuf = new byte[0];
|
||||
@@ -557,14 +524,11 @@ namespace DiscImageChef.Commands
|
||||
outputPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
||||
xattr, entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(Path.Combine(options.OutputDir, fs.XmlFSType.Type,
|
||||
@@ -599,20 +563,15 @@ namespace DiscImageChef.Commands
|
||||
outBuf.Length, entry, outputPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Error {0} reading file {1}", error,
|
||||
entry);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Cannot write file {0}, output exists",
|
||||
entry);
|
||||
}
|
||||
}
|
||||
else DicConsole.ErrorWriteLine("Error reading file {0}", entry);
|
||||
}
|
||||
}
|
||||
else
|
||||
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
||||
|
||||
@@ -620,7 +579,6 @@ namespace DiscImageChef.Commands
|
||||
}
|
||||
else DicConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -637,7 +595,6 @@ namespace DiscImageChef.Commands
|
||||
List<string> rootDir = new List<string>();
|
||||
error = fs.ReadDir("/", ref rootDir);
|
||||
if(error == Errno.NoError)
|
||||
{
|
||||
foreach(string entry in rootDir)
|
||||
{
|
||||
FileEntryInfo stat = new FileEntryInfo();
|
||||
@@ -657,7 +614,6 @@ namespace DiscImageChef.Commands
|
||||
|
||||
error = fs.ListXAttr(entry, ref xattrs);
|
||||
if(error == Errno.NoError)
|
||||
{
|
||||
foreach(string xattr in xattrs)
|
||||
{
|
||||
byte[] xattrBuf = new byte[0];
|
||||
@@ -694,14 +650,11 @@ namespace DiscImageChef.Commands
|
||||
xattrBuf.Length, xattr, entry, outputPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
DicConsole
|
||||
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
||||
xattr, entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(Path.Combine(options.OutputDir, fs.XmlFSType.Type,
|
||||
@@ -739,7 +692,6 @@ namespace DiscImageChef.Commands
|
||||
}
|
||||
else DicConsole.ErrorWriteLine("Error reading file {0}", entry);
|
||||
}
|
||||
}
|
||||
else DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
||||
|
||||
Core.Statistics.AddFilesystem(fs.XmlFSType.Type);
|
||||
|
||||
Reference in New Issue
Block a user