mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Remove unneeded code.
This commit is contained in:
@@ -40,7 +40,7 @@ namespace DiscImageChef.Filesystems.CPM
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
if(pathElements.Length != 1) return Errno.NotSupported;
|
||||
|
||||
FileEntryInfo fInfo;
|
||||
@@ -79,7 +79,7 @@ namespace DiscImageChef.Filesystems.CPM
|
||||
|
||||
if(offset < 0) return Errno.InvalidArgument;
|
||||
|
||||
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
if(pathElements.Length != 1) return Errno.NotSupported;
|
||||
|
||||
byte[] file;
|
||||
@@ -106,7 +106,7 @@ namespace DiscImageChef.Filesystems.CPM
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
if(pathElements.Length != 1) return Errno.NotSupported;
|
||||
|
||||
if(string.IsNullOrEmpty(path) || string.Compare(path, "/", StringComparison.OrdinalIgnoreCase) == 0)
|
||||
|
||||
@@ -38,6 +38,7 @@ using System.Text;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.DiscImages;
|
||||
using Schemas;
|
||||
|
||||
namespace DiscImageChef.Filesystems.CPM
|
||||
{
|
||||
@@ -1045,7 +1046,7 @@ namespace DiscImageChef.Filesystems.CPM
|
||||
if(labelUpdateDate != null)
|
||||
sb.AppendFormat("Volume updated on {0}", DateHandlers.CPMToDateTime(labelUpdateDate)).AppendLine();
|
||||
|
||||
xmlFSType = new Schemas.FileSystemType();
|
||||
xmlFSType = new FileSystemType();
|
||||
xmlFSType.Bootable |= workingDefinition.sofs > 0 || workingDefinition.ofs > 0;
|
||||
xmlFSType.ClusterSize = 128 << dpb.bsh;
|
||||
if(dpb.dsm > 0) xmlFSType.Clusters = dpb.dsm;
|
||||
|
||||
@@ -39,6 +39,7 @@ using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using DiscImageChef.Console;
|
||||
using Schemas;
|
||||
|
||||
namespace DiscImageChef.Filesystems.CPM
|
||||
{
|
||||
@@ -671,7 +672,7 @@ namespace DiscImageChef.Filesystems.CPM
|
||||
cpmStat.Type = "CP/M filesystem";
|
||||
|
||||
// Generate XML info
|
||||
xmlFSType = new Schemas.FileSystemType();
|
||||
xmlFSType = new FileSystemType();
|
||||
xmlFSType.Clusters = cpmStat.Blocks;
|
||||
xmlFSType.ClusterSize = blockSize;
|
||||
if(labelCreationDate != null)
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace DiscImageChef.Filesystems.CPM
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
if(pathElements.Length != 1) return Errno.NotSupported;
|
||||
|
||||
if(!fileCache.ContainsKey(pathElements[0].ToUpperInvariant())) return Errno.NoSuchFile;
|
||||
@@ -73,7 +73,7 @@ namespace DiscImageChef.Filesystems.CPM
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
|
||||
if(pathElements.Length != 1) return Errno.NotSupported;
|
||||
|
||||
if(!fileCache.ContainsKey(pathElements[0].ToUpperInvariant())) return Errno.NoSuchFile;
|
||||
|
||||
Reference in New Issue
Block a user