mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Minor refactors.
This commit is contained in:
@@ -77,7 +77,7 @@ namespace DiscImageChef.Devices.Windows
|
||||
catch(Exception ex)
|
||||
{
|
||||
#if DEBUG
|
||||
throw ex;
|
||||
throw;
|
||||
#else
|
||||
return null;
|
||||
#endif
|
||||
|
||||
@@ -1340,7 +1340,7 @@ namespace DiscImageChef.Filesystems
|
||||
if(entry.ctime > 0 && entry.cdate > 0)
|
||||
{
|
||||
xmlFSType.CreationDate = DateHandlers.DOSToDateTime(entry.cdate, entry.ctime);
|
||||
if(entry.ctime_ms > 0) xmlFSType.CreationDate.AddMilliseconds(entry.ctime_ms * 10);
|
||||
if(entry.ctime_ms > 0) xmlFSType.CreationDate = xmlFSType.CreationDate.AddMilliseconds(entry.ctime_ms * 10);
|
||||
xmlFSType.CreationDateSpecified = true;
|
||||
sb.AppendFormat("Volume created on {0}", xmlFSType.CreationDate).AppendLine();
|
||||
}
|
||||
|
||||
@@ -178,13 +178,14 @@ namespace DiscImageChef.Commands
|
||||
else
|
||||
{
|
||||
plugins.PluginsList.TryGetValue(idPlugins[0], out plugin);
|
||||
if(plugin == null) continue;
|
||||
|
||||
DicConsole.WriteLine(string.Format("Identified by {0}.", plugin.Name));
|
||||
Filesystem fs = (Filesystem)plugin
|
||||
.GetType().GetConstructor(new[]
|
||||
{
|
||||
typeof(ImagePlugin), typeof(Partition), typeof(Encoding)
|
||||
})
|
||||
?.Invoke(new object[] {imageFormat, partitions[i], null});
|
||||
})?.Invoke(new object[] {imageFormat, partitions[i], null});
|
||||
if(fs == null) continue;
|
||||
|
||||
error = fs.Mount(options.Debug);
|
||||
@@ -255,6 +256,8 @@ namespace DiscImageChef.Commands
|
||||
Filesystem fs = (Filesystem)plugin
|
||||
.GetType().GetConstructor(new[] {typeof(ImagePlugin), typeof(Partition), typeof(Encoding)})
|
||||
?.Invoke(new object[] {imageFormat, wholePart, null});
|
||||
if(fs != null)
|
||||
{
|
||||
error = fs.Mount(options.Debug);
|
||||
if(error == Errno.NoError)
|
||||
{
|
||||
@@ -281,13 +284,15 @@ namespace DiscImageChef.Commands
|
||||
byte[] xattrBuf = new byte[0];
|
||||
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
||||
if(error == Errno.NoError)
|
||||
DicConsole.WriteLine("\t\t{0}\t{1} bytes", xattr, xattrBuf.Length);
|
||||
DicConsole.WriteLine("\t\t{0}\t{1} bytes", xattr,
|
||||
xattrBuf.Length);
|
||||
}
|
||||
}
|
||||
else DicConsole.WriteLine("{0}", entry);
|
||||
}
|
||||
else DicConsole.WriteLine("{0}", entry);
|
||||
else DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
||||
else
|
||||
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
||||
|
||||
Core.Statistics.AddFilesystem(fs.XmlFSType.Type);
|
||||
}
|
||||
@@ -295,6 +300,7 @@ namespace DiscImageChef.Commands
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
DicConsole.ErrorWriteLine(string.Format("Error reading file: {0}", ex.Message));
|
||||
|
||||
Reference in New Issue
Block a user