From 43919deba3bbc1a6822303882f2c46e19a7789d0 Mon Sep 17 00:00:00 2001 From: Michael D Date: Sat, 5 Oct 2019 13:49:21 +0200 Subject: [PATCH] Simple fix for #222 --- DiscImageChef/Commands/ExtractFiles.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DiscImageChef/Commands/ExtractFiles.cs b/DiscImageChef/Commands/ExtractFiles.cs index 36b2c3345..2c4bd2155 100644 --- a/DiscImageChef/Commands/ExtractFiles.cs +++ b/DiscImageChef/Commands/ExtractFiles.cs @@ -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 } } } -} \ No newline at end of file +}