mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Update to Rider project version 2017.3.
This commit is contained in:
5
.idea/.idea.DiscImageChef/.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/.idea.DiscImageChef/.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
||||||
2
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
2
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ContentModelStore">
|
<component name="ContentModelStore">
|
||||||
<e p="$USER_HOME$/.Rider2017.2/system/resharper-host/local/Transient/ReSharperHost/v10/SolutionCaches/_DiscImageChef.73225794.00" t="ExcludeRecursive" />
|
<e p="$USER_HOME$/.Rider2017.3/system/resharper-host/local/Transient/ReSharperHost/v11/SolutionCaches/_DiscImageChef.73225794.00" t="ExcludeRecursive" />
|
||||||
<e p="$PROJECT_DIR$" t="IncludeFlat">
|
<e p="$PROJECT_DIR$" t="IncludeFlat">
|
||||||
<e p=".github" t="Include">
|
<e p=".github" t="Include">
|
||||||
<e p="CODE_OF_CONDUCT.md" t="Include" />
|
<e p="CODE_OF_CONDUCT.md" t="Include" />
|
||||||
|
|||||||
@@ -48,14 +48,16 @@ namespace DiscImageChef.Commands
|
|||||||
{
|
{
|
||||||
internal static void DoExtractFiles(ExtractFilesOptions options)
|
internal static void DoExtractFiles(ExtractFilesOptions options)
|
||||||
{
|
{
|
||||||
DicConsole.DebugWriteLine("Extract-Files command", "--debug={0}", options.Debug);
|
DicConsole.DebugWriteLine("Extract-Files command", "--debug={0}", options.Debug);
|
||||||
DicConsole.DebugWriteLine("Extract-Files command", "--verbose={0}", options.Verbose);
|
DicConsole.DebugWriteLine("Extract-Files command", "--verbose={0}", options.Verbose);
|
||||||
DicConsole.DebugWriteLine("Extract-Files command", "--input={0}", options.InputFile);
|
DicConsole.DebugWriteLine("Extract-Files command", "--input={0}", options.InputFile);
|
||||||
DicConsole.DebugWriteLine("Extract-Files command", "--xattrs={0}", options.Xattrs);
|
DicConsole.DebugWriteLine("Extract-Files command", "--xattrs={0}", options.Xattrs);
|
||||||
DicConsole.DebugWriteLine("Extract-Files command", "--output={0}", options.OutputDir);
|
DicConsole.DebugWriteLine("Extract-Files command", "--output={0}", options.OutputDir);
|
||||||
|
|
||||||
FiltersList filtersList = new FiltersList();
|
FiltersList filtersList = new FiltersList();
|
||||||
IFilter inputFilter = filtersList.GetFilter(options.InputFile);
|
IFilter inputFilter = filtersList.GetFilter(options.InputFile);
|
||||||
|
Dictionary<string, string> optionsDict =
|
||||||
|
new Dictionary<string, string> {{"debug", options.Debug.ToString()}};
|
||||||
|
|
||||||
if(inputFilter == null)
|
if(inputFilter == null)
|
||||||
{
|
{
|
||||||
@@ -133,9 +135,9 @@ namespace DiscImageChef.Commands
|
|||||||
List<Partition> partitions = Core.Partitions.GetAll(imageFormat);
|
List<Partition> partitions = Core.Partitions.GetAll(imageFormat);
|
||||||
Core.Partitions.AddSchemesToStats(partitions);
|
Core.Partitions.AddSchemesToStats(partitions);
|
||||||
|
|
||||||
List<string> idPlugins;
|
List<string> idPlugins;
|
||||||
IReadOnlyFilesystem plugin;
|
IReadOnlyFilesystem plugin;
|
||||||
Errno error;
|
Errno error;
|
||||||
if(partitions.Count == 0) DicConsole.DebugWriteLine("Extract-Files command", "No partitions found");
|
if(partitions.Count == 0) DicConsole.DebugWriteLine("Extract-Files command", "No partitions found");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -149,7 +151,7 @@ namespace DiscImageChef.Commands
|
|||||||
DicConsole.WriteLine("Identifying filesystem on partition");
|
DicConsole.WriteLine("Identifying filesystem on partition");
|
||||||
|
|
||||||
Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]);
|
Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]);
|
||||||
if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
|
if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
|
||||||
else if(idPlugins.Count > 1)
|
else if(idPlugins.Count > 1)
|
||||||
{
|
{
|
||||||
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
|
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
|
||||||
@@ -159,13 +161,15 @@ namespace DiscImageChef.Commands
|
|||||||
{
|
{
|
||||||
DicConsole.WriteLine($"As identified by {plugin.Name}.");
|
DicConsole.WriteLine($"As identified by {plugin.Name}.");
|
||||||
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
||||||
.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
.GetType()
|
||||||
|
.GetConstructor(Type.EmptyTypes)
|
||||||
|
?.Invoke(new object[] { });
|
||||||
|
|
||||||
error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug);
|
error = fs.Mount(imageFormat, partitions[i], encoding, optionsDict);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
List<string> rootDir = new List<string>();
|
List<string> rootDir = new List<string>();
|
||||||
error = fs.ReadDir("/", out rootDir);
|
error = fs.ReadDir("/", out rootDir);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
foreach(string entry in rootDir)
|
foreach(string entry in rootDir)
|
||||||
{
|
{
|
||||||
@@ -179,7 +183,7 @@ namespace DiscImageChef.Commands
|
|||||||
error = fs.Stat(entry, out stat);
|
error = fs.Stat(entry, out stat);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
string outputPath;
|
string outputPath;
|
||||||
FileStream outputFile;
|
FileStream outputFile;
|
||||||
if(options.Xattrs)
|
if(options.Xattrs)
|
||||||
{
|
{
|
||||||
@@ -190,14 +194,15 @@ namespace DiscImageChef.Commands
|
|||||||
foreach(string xattr in xattrs)
|
foreach(string xattr in xattrs)
|
||||||
{
|
{
|
||||||
byte[] xattrBuf = new byte[0];
|
byte[] xattrBuf = new byte[0];
|
||||||
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
error =
|
||||||
|
fs.GetXattr(entry, xattr, ref xattrBuf);
|
||||||
if(error != Errno.NoError) continue;
|
if(error != Errno.NoError) continue;
|
||||||
|
|
||||||
Directory
|
Directory
|
||||||
.CreateDirectory(Path.Combine(options.OutputDir,
|
.CreateDirectory(Path.Combine(options.OutputDir,
|
||||||
fs.XmlFsType.Type,
|
fs.XmlFsType.Type,
|
||||||
volumeName, ".xattrs",
|
volumeName, ".xattrs",
|
||||||
xattr));
|
xattr));
|
||||||
|
|
||||||
outputPath =
|
outputPath =
|
||||||
Path.Combine(options.OutputDir, fs.XmlFsType.Type,
|
Path.Combine(options.OutputDir, fs.XmlFsType.Type,
|
||||||
@@ -212,32 +217,34 @@ namespace DiscImageChef.Commands
|
|||||||
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
|
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
|
||||||
outputFile.Close();
|
outputFile.Close();
|
||||||
FileInfo fi = new FileInfo(outputPath);
|
FileInfo fi = new FileInfo(outputPath);
|
||||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
DicConsole
|
DicConsole
|
||||||
.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
|
.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
|
||||||
xattrBuf.Length, xattr, entry,
|
xattrBuf.Length, xattr, entry,
|
||||||
outputPath);
|
outputPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DicConsole
|
DicConsole
|
||||||
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
||||||
xattr, entry);
|
xattr, entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,23 +270,25 @@ namespace DiscImageChef.Commands
|
|||||||
outputFile.Write(outBuf, 0, outBuf.Length);
|
outputFile.Write(outBuf, 0, outBuf.Length);
|
||||||
outputFile.Close();
|
outputFile.Close();
|
||||||
FileInfo fi = new FileInfo(outputPath);
|
FileInfo fi = new FileInfo(outputPath);
|
||||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}",
|
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}",
|
||||||
outBuf.Length, entry, outputPath);
|
outBuf.Length, entry, outputPath);
|
||||||
}
|
}
|
||||||
@@ -289,8 +298,8 @@ namespace DiscImageChef.Commands
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
DicConsole
|
DicConsole
|
||||||
.ErrorWriteLine("Cannot write file {0}, output exists",
|
.ErrorWriteLine("Cannot write file {0}, output exists",
|
||||||
entry);
|
entry);
|
||||||
}
|
}
|
||||||
else DicConsole.ErrorWriteLine("Error reading file {0}", entry);
|
else DicConsole.ErrorWriteLine("Error reading file {0}", entry);
|
||||||
}
|
}
|
||||||
@@ -310,12 +319,13 @@ namespace DiscImageChef.Commands
|
|||||||
plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin);
|
plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin);
|
||||||
DicConsole.WriteLine($"Identified by {plugin.Name}.");
|
DicConsole.WriteLine($"Identified by {plugin.Name}.");
|
||||||
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
||||||
.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
.GetType().GetConstructor(Type.EmptyTypes)
|
||||||
error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug);
|
?.Invoke(new object[] { });
|
||||||
|
error = fs.Mount(imageFormat, partitions[i], encoding, optionsDict);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
List<string> rootDir = new List<string>();
|
List<string> rootDir = new List<string>();
|
||||||
error = fs.ReadDir("/", out rootDir);
|
error = fs.ReadDir("/", out rootDir);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
foreach(string entry in rootDir)
|
foreach(string entry in rootDir)
|
||||||
{
|
{
|
||||||
@@ -330,7 +340,7 @@ namespace DiscImageChef.Commands
|
|||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
FileStream outputFile;
|
FileStream outputFile;
|
||||||
string outputPath;
|
string outputPath;
|
||||||
if(options.Xattrs)
|
if(options.Xattrs)
|
||||||
{
|
{
|
||||||
List<string> xattrs = new List<string>();
|
List<string> xattrs = new List<string>();
|
||||||
@@ -340,7 +350,7 @@ namespace DiscImageChef.Commands
|
|||||||
foreach(string xattr in xattrs)
|
foreach(string xattr in xattrs)
|
||||||
{
|
{
|
||||||
byte[] xattrBuf = new byte[0];
|
byte[] xattrBuf = new byte[0];
|
||||||
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
||||||
if(error != Errno.NoError) continue;
|
if(error != Errno.NoError) continue;
|
||||||
|
|
||||||
Directory.CreateDirectory(Path.Combine(options.OutputDir,
|
Directory.CreateDirectory(Path.Combine(options.OutputDir,
|
||||||
@@ -360,31 +370,33 @@ namespace DiscImageChef.Commands
|
|||||||
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
|
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
|
||||||
outputFile.Close();
|
outputFile.Close();
|
||||||
FileInfo fi = new FileInfo(outputPath);
|
FileInfo fi = new FileInfo(outputPath);
|
||||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
DicConsole
|
DicConsole
|
||||||
.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
|
.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
|
||||||
xattrBuf.Length, xattr, entry, outputPath);
|
xattrBuf.Length, xattr, entry, outputPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DicConsole
|
DicConsole
|
||||||
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
||||||
xattr, entry);
|
xattr, entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,23 +420,25 @@ namespace DiscImageChef.Commands
|
|||||||
outputFile.Write(outBuf, 0, outBuf.Length);
|
outputFile.Write(outBuf, 0, outBuf.Length);
|
||||||
outputFile.Close();
|
outputFile.Close();
|
||||||
FileInfo fi = new FileInfo(outputPath);
|
FileInfo fi = new FileInfo(outputPath);
|
||||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}",
|
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}",
|
||||||
outBuf.Length, entry, outputPath);
|
outBuf.Length, entry, outputPath);
|
||||||
}
|
}
|
||||||
@@ -450,13 +464,13 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
Partition wholePart = new Partition
|
Partition wholePart = new Partition
|
||||||
{
|
{
|
||||||
Name = "Whole device",
|
Name = "Whole device",
|
||||||
Length = imageFormat.Info.Sectors,
|
Length = imageFormat.Info.Sectors,
|
||||||
Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize
|
Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize
|
||||||
};
|
};
|
||||||
|
|
||||||
Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart);
|
Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart);
|
||||||
if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
|
if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
|
||||||
else if(idPlugins.Count > 1)
|
else if(idPlugins.Count > 1)
|
||||||
{
|
{
|
||||||
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
|
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
|
||||||
@@ -466,12 +480,13 @@ namespace DiscImageChef.Commands
|
|||||||
{
|
{
|
||||||
DicConsole.WriteLine($"As identified by {plugin.Name}.");
|
DicConsole.WriteLine($"As identified by {plugin.Name}.");
|
||||||
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
||||||
.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
.GetType().GetConstructor(Type.EmptyTypes)
|
||||||
error = fs.Mount(imageFormat, wholePart, encoding, options.Debug);
|
?.Invoke(new object[] { });
|
||||||
|
error = fs.Mount(imageFormat, wholePart, encoding, optionsDict);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
List<string> rootDir = new List<string>();
|
List<string> rootDir = new List<string>();
|
||||||
error = fs.ReadDir("/", out rootDir);
|
error = fs.ReadDir("/", out rootDir);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
foreach(string entry in rootDir)
|
foreach(string entry in rootDir)
|
||||||
{
|
{
|
||||||
@@ -486,7 +501,7 @@ namespace DiscImageChef.Commands
|
|||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
FileStream outputFile;
|
FileStream outputFile;
|
||||||
string outputPath;
|
string outputPath;
|
||||||
if(options.Xattrs)
|
if(options.Xattrs)
|
||||||
{
|
{
|
||||||
List<string> xattrs = new List<string>();
|
List<string> xattrs = new List<string>();
|
||||||
@@ -496,7 +511,7 @@ namespace DiscImageChef.Commands
|
|||||||
foreach(string xattr in xattrs)
|
foreach(string xattr in xattrs)
|
||||||
{
|
{
|
||||||
byte[] xattrBuf = new byte[0];
|
byte[] xattrBuf = new byte[0];
|
||||||
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
||||||
if(error != Errno.NoError) continue;
|
if(error != Errno.NoError) continue;
|
||||||
|
|
||||||
Directory.CreateDirectory(Path.Combine(options.OutputDir,
|
Directory.CreateDirectory(Path.Combine(options.OutputDir,
|
||||||
@@ -516,31 +531,33 @@ namespace DiscImageChef.Commands
|
|||||||
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
|
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
|
||||||
outputFile.Close();
|
outputFile.Close();
|
||||||
FileInfo fi = new FileInfo(outputPath);
|
FileInfo fi = new FileInfo(outputPath);
|
||||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
DicConsole
|
DicConsole
|
||||||
.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
|
.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
|
||||||
xattrBuf.Length, xattr, entry, outputPath);
|
xattrBuf.Length, xattr, entry, outputPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DicConsole
|
DicConsole
|
||||||
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
||||||
xattr, entry);
|
xattr, entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,23 +581,25 @@ namespace DiscImageChef.Commands
|
|||||||
outputFile.Write(outBuf, 0, outBuf.Length);
|
outputFile.Write(outBuf, 0, outBuf.Length);
|
||||||
outputFile.Close();
|
outputFile.Close();
|
||||||
FileInfo fi = new FileInfo(outputPath);
|
FileInfo fi = new FileInfo(outputPath);
|
||||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}",
|
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}",
|
||||||
outBuf.Length, entry, outputPath);
|
outBuf.Length, entry, outputPath);
|
||||||
}
|
}
|
||||||
@@ -606,13 +625,13 @@ namespace DiscImageChef.Commands
|
|||||||
{
|
{
|
||||||
plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin);
|
plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin);
|
||||||
DicConsole.WriteLine($"Identified by {plugin.Name}.");
|
DicConsole.WriteLine($"Identified by {plugin.Name}.");
|
||||||
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
IReadOnlyFilesystem fs =
|
||||||
.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
(IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
||||||
error = fs.Mount(imageFormat, wholePart, encoding, options.Debug);
|
error = fs.Mount(imageFormat, wholePart, encoding, optionsDict);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
List<string> rootDir = new List<string>();
|
List<string> rootDir = new List<string>();
|
||||||
error = fs.ReadDir("/", out rootDir);
|
error = fs.ReadDir("/", out rootDir);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
foreach(string entry in rootDir)
|
foreach(string entry in rootDir)
|
||||||
{
|
{
|
||||||
@@ -625,7 +644,7 @@ namespace DiscImageChef.Commands
|
|||||||
error = fs.Stat(entry, out stat);
|
error = fs.Stat(entry, out stat);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
string outputPath;
|
string outputPath;
|
||||||
FileStream outputFile;
|
FileStream outputFile;
|
||||||
if(options.Xattrs)
|
if(options.Xattrs)
|
||||||
{
|
{
|
||||||
@@ -636,7 +655,7 @@ namespace DiscImageChef.Commands
|
|||||||
foreach(string xattr in xattrs)
|
foreach(string xattr in xattrs)
|
||||||
{
|
{
|
||||||
byte[] xattrBuf = new byte[0];
|
byte[] xattrBuf = new byte[0];
|
||||||
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
||||||
if(error != Errno.NoError) continue;
|
if(error != Errno.NoError) continue;
|
||||||
|
|
||||||
Directory.CreateDirectory(Path.Combine(options.OutputDir,
|
Directory.CreateDirectory(Path.Combine(options.OutputDir,
|
||||||
@@ -655,31 +674,33 @@ namespace DiscImageChef.Commands
|
|||||||
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
|
outputFile.Write(xattrBuf, 0, xattrBuf.Length);
|
||||||
outputFile.Close();
|
outputFile.Close();
|
||||||
FileInfo fi = new FileInfo(outputPath);
|
FileInfo fi = new FileInfo(outputPath);
|
||||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
DicConsole
|
DicConsole
|
||||||
.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
|
.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}",
|
||||||
xattrBuf.Length, xattr, entry, outputPath);
|
xattrBuf.Length, xattr, entry, outputPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DicConsole
|
DicConsole
|
||||||
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists",
|
||||||
xattr, entry);
|
xattr, entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -701,23 +722,25 @@ namespace DiscImageChef.Commands
|
|||||||
outputFile.Write(outBuf, 0, outBuf.Length);
|
outputFile.Write(outBuf, 0, outBuf.Length);
|
||||||
outputFile.Close();
|
outputFile.Close();
|
||||||
FileInfo fi = new FileInfo(outputPath);
|
FileInfo fi = new FileInfo(outputPath);
|
||||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
try { fi.CreationTimeUtc = stat.CreationTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
try { fi.LastWriteTimeUtc = stat.LastWriteTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
try { fi.LastAccessTimeUtc = stat.AccessTimeUtc; }
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||||
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}", outBuf.Length,
|
DicConsole.WriteLine("Written {0} bytes of file {1} to {2}", outBuf.Length,
|
||||||
entry, outputPath);
|
entry, outputPath);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,12 +46,14 @@ namespace DiscImageChef.Commands
|
|||||||
{
|
{
|
||||||
internal static void DoLs(LsOptions options)
|
internal static void DoLs(LsOptions options)
|
||||||
{
|
{
|
||||||
DicConsole.DebugWriteLine("Ls command", "--debug={0}", options.Debug);
|
DicConsole.DebugWriteLine("Ls command", "--debug={0}", options.Debug);
|
||||||
DicConsole.DebugWriteLine("Ls command", "--verbose={0}", options.Verbose);
|
DicConsole.DebugWriteLine("Ls command", "--verbose={0}", options.Verbose);
|
||||||
DicConsole.DebugWriteLine("Ls command", "--input={0}", options.InputFile);
|
DicConsole.DebugWriteLine("Ls command", "--input={0}", options.InputFile);
|
||||||
|
|
||||||
FiltersList filtersList = new FiltersList();
|
FiltersList filtersList = new FiltersList();
|
||||||
IFilter inputFilter = filtersList.GetFilter(options.InputFile);
|
IFilter inputFilter = filtersList.GetFilter(options.InputFile);
|
||||||
|
Dictionary<string, string> optionsDict =
|
||||||
|
new Dictionary<string, string> {{"debug", options.Debug.ToString()}};
|
||||||
|
|
||||||
if(inputFilter == null)
|
if(inputFilter == null)
|
||||||
{
|
{
|
||||||
@@ -120,9 +122,9 @@ namespace DiscImageChef.Commands
|
|||||||
List<Partition> partitions = Core.Partitions.GetAll(imageFormat);
|
List<Partition> partitions = Core.Partitions.GetAll(imageFormat);
|
||||||
Core.Partitions.AddSchemesToStats(partitions);
|
Core.Partitions.AddSchemesToStats(partitions);
|
||||||
|
|
||||||
List<string> idPlugins;
|
List<string> idPlugins;
|
||||||
IReadOnlyFilesystem plugin;
|
IReadOnlyFilesystem plugin;
|
||||||
Errno error;
|
Errno error;
|
||||||
if(partitions.Count == 0) DicConsole.DebugWriteLine("Ls command", "No partitions found");
|
if(partitions.Count == 0) DicConsole.DebugWriteLine("Ls command", "No partitions found");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -136,7 +138,7 @@ namespace DiscImageChef.Commands
|
|||||||
DicConsole.WriteLine("Identifying filesystem on partition");
|
DicConsole.WriteLine("Identifying filesystem on partition");
|
||||||
|
|
||||||
Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]);
|
Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]);
|
||||||
if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
|
if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
|
||||||
else if(idPlugins.Count > 1)
|
else if(idPlugins.Count > 1)
|
||||||
{
|
{
|
||||||
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
|
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
|
||||||
@@ -146,17 +148,20 @@ namespace DiscImageChef.Commands
|
|||||||
{
|
{
|
||||||
DicConsole.WriteLine($"As identified by {plugin.Name}.");
|
DicConsole.WriteLine($"As identified by {plugin.Name}.");
|
||||||
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
||||||
.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
.GetType()
|
||||||
|
.GetConstructor(Type.EmptyTypes)
|
||||||
|
?.Invoke(new object[] { });
|
||||||
|
|
||||||
if(fs == null) continue;
|
if(fs == null) continue;
|
||||||
|
|
||||||
error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug);
|
error = fs.Mount(imageFormat, partitions[i], encoding, optionsDict);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
List<string> rootDir = new List<string>();
|
List<string> rootDir = new List<string>();
|
||||||
error = fs.ReadDir("/", out rootDir);
|
error = fs.ReadDir("/", out rootDir);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
foreach(string entry in rootDir) DicConsole.WriteLine("{0}", entry);
|
foreach(string entry in rootDir)
|
||||||
|
DicConsole.WriteLine("{0}", entry);
|
||||||
else
|
else
|
||||||
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}",
|
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}",
|
||||||
error.ToString());
|
error.ToString());
|
||||||
@@ -175,16 +180,18 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
DicConsole.WriteLine($"Identified by {plugin.Name}.");
|
DicConsole.WriteLine($"Identified by {plugin.Name}.");
|
||||||
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
||||||
.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
.GetType().GetConstructor(Type.EmptyTypes)
|
||||||
|
?.Invoke(new object[] { });
|
||||||
if(fs == null) continue;
|
if(fs == null) continue;
|
||||||
|
|
||||||
error = fs.Mount(imageFormat, partitions[i], encoding, options.Debug);
|
error = fs.Mount(imageFormat, partitions[i], encoding, optionsDict);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
List<string> rootDir = new List<string>();
|
List<string> rootDir = new List<string>();
|
||||||
error = fs.ReadDir("/", out rootDir);
|
error = fs.ReadDir("/", out rootDir);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
foreach(string entry in rootDir) DicConsole.WriteLine("{0}", entry);
|
foreach(string entry in rootDir)
|
||||||
|
DicConsole.WriteLine("{0}", entry);
|
||||||
else
|
else
|
||||||
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
||||||
|
|
||||||
@@ -197,13 +204,13 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
Partition wholePart = new Partition
|
Partition wholePart = new Partition
|
||||||
{
|
{
|
||||||
Name = "Whole device",
|
Name = "Whole device",
|
||||||
Length = imageFormat.Info.Sectors,
|
Length = imageFormat.Info.Sectors,
|
||||||
Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize
|
Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize
|
||||||
};
|
};
|
||||||
|
|
||||||
Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart);
|
Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart);
|
||||||
if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
|
if(idPlugins.Count == 0) DicConsole.WriteLine("Filesystem not identified");
|
||||||
else if(idPlugins.Count > 1)
|
else if(idPlugins.Count > 1)
|
||||||
{
|
{
|
||||||
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
|
DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins");
|
||||||
@@ -213,16 +220,18 @@ namespace DiscImageChef.Commands
|
|||||||
{
|
{
|
||||||
DicConsole.WriteLine($"As identified by {plugin.Name}.");
|
DicConsole.WriteLine($"As identified by {plugin.Name}.");
|
||||||
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
||||||
.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
.GetType().GetConstructor(Type.EmptyTypes)
|
||||||
|
?.Invoke(new object[] { });
|
||||||
if(fs == null) continue;
|
if(fs == null) continue;
|
||||||
|
|
||||||
error = fs.Mount(imageFormat, wholePart, encoding, options.Debug);
|
error = fs.Mount(imageFormat, wholePart, encoding, optionsDict);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
List<string> rootDir = new List<string>();
|
List<string> rootDir = new List<string>();
|
||||||
error = fs.ReadDir("/", out rootDir);
|
error = fs.ReadDir("/", out rootDir);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
foreach(string entry in rootDir) DicConsole.WriteLine("{0}", entry);
|
foreach(string entry in rootDir)
|
||||||
|
DicConsole.WriteLine("{0}", entry);
|
||||||
else
|
else
|
||||||
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
||||||
|
|
||||||
@@ -237,21 +246,22 @@ namespace DiscImageChef.Commands
|
|||||||
if(plugin != null)
|
if(plugin != null)
|
||||||
{
|
{
|
||||||
DicConsole.WriteLine($"Identified by {plugin.Name}.");
|
DicConsole.WriteLine($"Identified by {plugin.Name}.");
|
||||||
IReadOnlyFilesystem fs = (IReadOnlyFilesystem)plugin
|
IReadOnlyFilesystem fs =
|
||||||
.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
(IReadOnlyFilesystem)plugin
|
||||||
|
.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
||||||
if(fs != null)
|
if(fs != null)
|
||||||
{
|
{
|
||||||
error = fs.Mount(imageFormat, wholePart, encoding, options.Debug);
|
error = fs.Mount(imageFormat, wholePart, encoding, optionsDict);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
{
|
{
|
||||||
List<string> rootDir = new List<string>();
|
List<string> rootDir = new List<string>();
|
||||||
error = fs.ReadDir("/", out rootDir);
|
error = fs.ReadDir("/", out rootDir);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
foreach(string entry in rootDir)
|
foreach(string entry in rootDir)
|
||||||
if(options.Long)
|
if(options.Long)
|
||||||
{
|
{
|
||||||
FileEntryInfo stat = new FileEntryInfo();
|
FileEntryInfo stat = new FileEntryInfo();
|
||||||
List<string> xattrs = new List<string>();
|
List<string> xattrs = new List<string>();
|
||||||
|
|
||||||
error = fs.Stat(entry, out stat);
|
error = fs.Stat(entry, out stat);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
@@ -265,7 +275,7 @@ namespace DiscImageChef.Commands
|
|||||||
foreach(string xattr in xattrs)
|
foreach(string xattr in xattrs)
|
||||||
{
|
{
|
||||||
byte[] xattrBuf = new byte[0];
|
byte[] xattrBuf = new byte[0];
|
||||||
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
error = fs.GetXattr(entry, xattr, ref xattrBuf);
|
||||||
if(error == Errno.NoError)
|
if(error == Errno.NoError)
|
||||||
DicConsole.WriteLine("\t\t{0}\t{1} bytes", xattr,
|
DicConsole.WriteLine("\t\t{0}\t{1} bytes", xattr,
|
||||||
xattrBuf.Length);
|
xattrBuf.Length);
|
||||||
@@ -273,7 +283,8 @@ namespace DiscImageChef.Commands
|
|||||||
}
|
}
|
||||||
else DicConsole.WriteLine("{0}", entry);
|
else DicConsole.WriteLine("{0}", entry);
|
||||||
}
|
}
|
||||||
else DicConsole.WriteLine("{0}", entry);
|
else
|
||||||
|
DicConsole.WriteLine("{0}", entry);
|
||||||
else
|
else
|
||||||
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user