h4ck-rOOt / Lynda-Decryptor

Decrypts all .lynda and .ldcw files from the video2brain desktop app.
MIT License
213 stars 73 forks source link

Unhandled Exception: System.ArgumentException: Illegal characters in path. #1

Open Dev-iL opened 8 years ago

Dev-iL commented 8 years ago

This happens when the output folder is specified with a \ at the end.

Here's the error message:

Unhandled Exception: System.ArgumentException: Illegal characters in path.
   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   at System.IO.Directory.CreateDirectory(String path)
   at LyndaDecryptor.Program.<DecryptAll>d__21.MoveNext() in E:\GitHub\Lynda-Decryptor\LyndaDecryptor\Program.cs:line 226
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

P.S. That's a really cool library you got here :)

h4ck-rOOt commented 8 years ago

Sorry for my late reply, had a lot of work todo the past months... First of all thanks for using this little program. I discovered the same error in a previous version of the decryptor and tried to replace all illegal chars on the path variable. The main problem was, using the sqlite mode, there a lot of characters in the title which weren't replaced by System.IO.Path.GetInvalidPathChars() or even System.IO.Path.GetInvalidFileNameChars.

I think you'll have to replace those special characters on your own in file Program.cs on line 47 or 49 and recompile the decryptor. This will fix the error (just a workaround).