mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
Use range indexers.
This commit is contained in:
@@ -348,7 +348,7 @@ public class Vfs : IDisposable
|
|||||||
|
|
||||||
internal CachedDisk GetDisk(ulong machineId, string name)
|
internal CachedDisk GetDisk(ulong machineId, string name)
|
||||||
{
|
{
|
||||||
if(name.EndsWith(".chd", StringComparison.OrdinalIgnoreCase)) name = name.Substring(0, name.Length - 4);
|
if(name.EndsWith(".chd", StringComparison.OrdinalIgnoreCase)) name = name[..^4];
|
||||||
|
|
||||||
ConcurrentDictionary<string, CachedDisk> cachedDisks = GetDisksFromMachine(machineId);
|
ConcurrentDictionary<string, CachedDisk> cachedDisks = GetDisksFromMachine(machineId);
|
||||||
|
|
||||||
@@ -359,7 +359,7 @@ public class Vfs : IDisposable
|
|||||||
|
|
||||||
internal CachedMedia GetMedia(ulong machineId, string name)
|
internal CachedMedia GetMedia(ulong machineId, string name)
|
||||||
{
|
{
|
||||||
if(name.EndsWith(".aif", StringComparison.OrdinalIgnoreCase)) name = name.Substring(0, name.Length - 4);
|
if(name.EndsWith(".aif", StringComparison.OrdinalIgnoreCase)) name = name[..^4];
|
||||||
|
|
||||||
ConcurrentDictionary<string, CachedMedia> cachedMedias = GetMediasFromMachine(machineId);
|
ConcurrentDictionary<string, CachedMedia> cachedMedias = GetMediasFromMachine(machineId);
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public class FileExporter
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(machineName.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
|
if(machineName.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
|
||||||
machineName = machineName.Substring(0, machineName.Length - 4);
|
machineName = machineName[..^4];
|
||||||
|
|
||||||
string machinePath = Path.Combine(_outPath, machineName);
|
string machinePath = Path.Combine(_outPath, machineName);
|
||||||
|
|
||||||
@@ -338,7 +338,7 @@ public class FileExporter
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(machineName.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
|
if(machineName.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
|
||||||
machineName = machineName.Substring(0, machineName.Length - 4);
|
machineName = machineName[..^4];
|
||||||
|
|
||||||
string machinePath = Path.Combine(_outPath, machineName);
|
string machinePath = Path.Combine(_outPath, machineName);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user