diff --git a/LyndaDecryptor/Decryptor.cs b/LyndaDecryptor/Decryptor.cs index 77ac9e9..ac195ed 100644 --- a/LyndaDecryptor/Decryptor.cs +++ b/LyndaDecryptor/Decryptor.cs @@ -128,6 +128,8 @@ public void DecryptAll(string folderPath, string outputFolder = "") if (!string.IsNullOrWhiteSpace(outputFolder)) OutputDirectory = Directory.Exists(outputFolder) ? new DirectoryInfo(outputFolder) : Directory.CreateDirectory(outputFolder); + if (OutputDirectory == null) + OutputDirectory = new DirectoryInfo(folderPath); foreach (string entry in Directory.EnumerateFiles(folderPath, "*.lynda", SearchOption.AllDirectories)) { diff --git a/LyndaDecryptor/Program.cs b/LyndaDecryptor/Program.cs index 996145b..b8784a2 100644 --- a/LyndaDecryptor/Program.cs +++ b/LyndaDecryptor/Program.cs @@ -46,7 +46,7 @@ static void Main(string[] args) if (decryptorOptions.UsageMode == Mode.Folder) - decryptor.DecryptAll(decryptorOptions.InputPath, decryptorOptions.OutputPath); + decryptor.DecryptAll(decryptorOptions.InputPath, decryptorOptions.OutputFolder); else if (decryptorOptions.UsageMode == Mode.File) decryptor.Decrypt(decryptorOptions.InputPath, decryptorOptions.OutputPath); }