Fix CA1310, CA1311
This commit is contained in:
committed by
Matthias Mailänder
parent
d83e579dfe
commit
285443f10f
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Installer
|
||||
public void RunActionOnSource(MiniYaml actionYaml, string path, ModData modData, List<string> extracted, Action<string> updateMessage)
|
||||
{
|
||||
// Yaml path must be specified relative to a named directory (e.g. ^SupportDir)
|
||||
if (!actionYaml.Value.StartsWith("^"))
|
||||
if (!actionYaml.Value.StartsWith('^'))
|
||||
return;
|
||||
|
||||
var sourcePath = Platform.ResolvePath(actionYaml.Value);
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Installer
|
||||
public void RunActionOnSource(MiniYaml actionYaml, string path, ModData modData, List<string> extracted, Action<string> updateMessage)
|
||||
{
|
||||
// Yaml path may be specified relative to a named directory (e.g. ^SupportDir) or the detected source path
|
||||
var sourcePath = actionYaml.Value.StartsWith("^") ? Platform.ResolvePath(actionYaml.Value) : FS.ResolveCaseInsensitivePath(Path.Combine(path, actionYaml.Value));
|
||||
var sourcePath = actionYaml.Value.StartsWith('^') ? Platform.ResolvePath(actionYaml.Value) : FS.ResolveCaseInsensitivePath(Path.Combine(path, actionYaml.Value));
|
||||
|
||||
using (var source = File.OpenRead(sourcePath))
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Installer
|
||||
public void RunActionOnSource(MiniYaml actionYaml, string path, ModData modData, List<string> extracted, Action<string> updateMessage)
|
||||
{
|
||||
// Yaml path may be specified relative to a named directory (e.g. ^SupportDir) or the detected source path
|
||||
var sourcePath = actionYaml.Value.StartsWith("^") ? Platform.ResolvePath(actionYaml.Value) : FS.ResolveCaseInsensitivePath(Path.Combine(path, actionYaml.Value));
|
||||
var sourcePath = actionYaml.Value.StartsWith('^') ? Platform.ResolvePath(actionYaml.Value) : FS.ResolveCaseInsensitivePath(Path.Combine(path, actionYaml.Value));
|
||||
|
||||
var volumeNode = actionYaml.Nodes.FirstOrDefault(n => n.Key == "Volumes");
|
||||
if (volumeNode == null)
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Installer
|
||||
public void RunActionOnSource(MiniYaml actionYaml, string path, ModData modData, List<string> extracted, Action<string> updateMessage)
|
||||
{
|
||||
// Yaml path may be specified relative to a named directory (e.g. ^SupportDir) or the detected source path
|
||||
var sourcePath = actionYaml.Value.StartsWith("^") ? Platform.ResolvePath(actionYaml.Value) : FS.ResolveCaseInsensitivePath(Path.Combine(path, actionYaml.Value));
|
||||
var sourcePath = actionYaml.Value.StartsWith('^') ? Platform.ResolvePath(actionYaml.Value) : FS.ResolveCaseInsensitivePath(Path.Combine(path, actionYaml.Value));
|
||||
|
||||
using (var source = File.OpenRead(sourcePath))
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Installer
|
||||
public void RunActionOnSource(MiniYaml actionYaml, string path, ModData modData, List<string> extracted, Action<string> updateMessage)
|
||||
{
|
||||
// Yaml path may be specified relative to a named directory (e.g. ^SupportDir) or the detected source path
|
||||
var sourcePath = actionYaml.Value.StartsWith("^") ? Platform.ResolvePath(actionYaml.Value) : FS.ResolveCaseInsensitivePath(Path.Combine(path, actionYaml.Value));
|
||||
var sourcePath = actionYaml.Value.StartsWith('^') ? Platform.ResolvePath(actionYaml.Value) : FS.ResolveCaseInsensitivePath(Path.Combine(path, actionYaml.Value));
|
||||
|
||||
using (var source = File.OpenRead(sourcePath))
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Installer
|
||||
public void RunActionOnSource(MiniYaml actionYaml, string path, ModData modData, List<string> extracted,
|
||||
Action<string> updateMessage)
|
||||
{
|
||||
var zipPath = actionYaml.Value.StartsWith("^")
|
||||
var zipPath = actionYaml.Value.StartsWith('^')
|
||||
? Platform.ResolvePath(actionYaml.Value)
|
||||
: FS.ResolveCaseInsensitivePath(Path.Combine(path, actionYaml.Value));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user