Skip to content

Commit

Permalink
Allow quoted paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaily committed Apr 22, 2018
1 parent 4706527 commit 65735b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MovieBarCodeGenerator/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ Here is all the info available at the time of the error (press Ctrl+C to copy it

private (string InputPath, string OutputPath, BarCodeParameters Parameters) GetValidatedParameters()
{
var inputPath = inputPathTextBox.Text;
var inputPath = inputPathTextBox.Text.Trim(new [] { '"' });
if (!File.Exists(inputPath))
{
throw new Exception("The input file does not exist.");
}

var outputPath = outputPathTextBox.Text;
var outputPath = outputPathTextBox.Text.Trim(new[] { '"' });
if (string.IsNullOrWhiteSpace(outputPath) || outputPath.Any(x => Path.GetInvalidPathChars().Contains(x)))
{
throw new Exception("The output path is invalid.");
Expand Down

0 comments on commit 65735b4

Please sign in to comment.