Skip to content

Commit

Permalink
Merged Pull Request #10 with fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
h4ck-rOOt committed Jan 30, 2017
1 parent f018758 commit 52327f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions LyndaDecryptor/Decryptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ public void DecryptAll(string folderPath, string outputFolder = "")
if (!Directory.Exists(folderPath))
throw new DirectoryNotFoundException();

if (!string.IsNullOrWhiteSpace(outputFolder))
OutputDirectory = Directory.Exists(outputFolder) ? new DirectoryInfo(outputFolder) : Directory.CreateDirectory(outputFolder);
if(string.IsNullOrWhiteSpace(outputFolder))
outputFolder = Path.Combine(Path.GetDirectoryName(folderPath), "decrypted");

OutputDirectory = Directory.Exists(outputFolder) ? new DirectoryInfo(outputFolder) : Directory.CreateDirectory(outputFolder);

foreach (string entry in Directory.EnumerateFiles(folderPath, "*.lynda", SearchOption.AllDirectories))
{
Expand Down
2 changes: 1 addition & 1 deletion LyndaDecryptor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 52327f2

Please sign in to comment.