Use range indexers.

This commit is contained in:
2024-11-12 06:46:45 +00:00
parent 3522fe3028
commit 7e94ea0a4d
2 changed files with 4 additions and 4 deletions

View File

@@ -133,7 +133,7 @@ public class FileExporter
});
if(machineName.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
machineName = machineName.Substring(0, machineName.Length - 4);
machineName = machineName[..^4];
string machinePath = Path.Combine(_outPath, machineName);
@@ -338,7 +338,7 @@ public class FileExporter
});
if(machineName.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
machineName = machineName.Substring(0, machineName.Length - 4);
machineName = machineName[..^4];
string machinePath = Path.Combine(_outPath, machineName);