Simple fix for #222

This commit is contained in:
Michael D
2019-10-05 13:49:21 +02:00
parent f0897168e7
commit 43919deba3

View File

@@ -163,6 +163,12 @@ namespace DiscImageChef.Commands
imageFormat.Id);
else DicConsole.WriteLine("Image format identified by {0}.", imageFormat.Name);
if (outputDir == null)
{
DicConsole.WriteLine("Output directory missing.");
return (int)ErrorNumber.MissingArgument;
}
if(Directory.Exists(outputDir) || File.Exists(outputDir))
{
DicConsole.ErrorWriteLine("Destination exists, aborting.");
@@ -519,4 +525,4 @@ namespace DiscImageChef.Commands
}
}
}
}
}