Fix issue with odd quoting (fixes #779)

This commit is contained in:
Matt Nadareski
2024-12-12 11:35:54 -05:00
parent 53c6e47fa8
commit 7d22341d2f
3 changed files with 14 additions and 2 deletions

View File

@@ -70,6 +70,7 @@
- Always omit EA CD-Key
- Add packer filtering tests
- Simplify prefix filtering
- Fix issue with odd quoting
### 3.2.4 (2024-11-24)

View File

@@ -80,6 +80,17 @@ namespace MPF.ExecutionContexts.Test
Assert.True(context.IsDumpingCommand());
}
[Theory]
[InlineData("cd --drive=dr --image-path=\"directory name\" --image-name=\"image name.bin\"")]
public void SpacesTest(string parameters)
{
string? expected = "cd --drive=dr --image-path=\"directory name\" --image-name=\"image name.bin\"";
var context = new ExecutionContext(parameters);
string? actual = context.GenerateParameters();
Assert.Equal(expected, actual);
Assert.True(context.IsDumpingCommand());
}
#endregion
#region DVD

View File

@@ -97,7 +97,7 @@ namespace MPF.ExecutionContexts.Data
}
index++;
Value = parts[index];
Value = parts[index].Trim('"');
return true;
}
@@ -116,7 +116,7 @@ namespace MPF.ExecutionContexts.Data
return !_required;
}
Value = val;
Value = val.Trim('"');
return true;
}