.NET loading failed with UNC path - Logger.GetAssemblyFilePath breaks UNC path

Advertisement

Julian304
Joined:
Posts:
10
Location:
Netherlands

.NET loading failed with UNC path - Logger.GetAssemblyFilePath breaks UNC path

We having trouble loading a website from an UNC path.
If checked the code, and the problem is in Logger.GetAssemblyFilePath

- ExeSessionProcess.GetExecutablePath() fails for UNC paths, it's using Logger.GetAssemblyFilePath, and there is a file:// trick inside it.

In case of the UNC path, the Assembly.Codebase of dll is: "file://myUNCFolder/folder/bin/myDll.DLL" - (that's correct)

By removing the file:// prefix in Logger.GetAssemblyFilePath, it will be "myUNCFolder/folder/bin/myDll.DLL" - and that's incorrect.

Are Pull requests accepted to GitHub? It's correct that there aren't any unit tests yet?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: .NET loading failed with UNC path - Logger.GetAssemblyFilePath breaks UNC path

Thanks for your report.

This issue has been added to the tracker:
https://winscp.net/tracker/1671

I've fixed the problem. I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Though, the next time, we of course accept pull requests.

Atm, we do not make code of our tests public.

Reply with quote

Julian304
Joined:
Posts:
10
Location:
Netherlands

Thanks!

Thanks also for the development version (in the mail). Currently I have created a work around (copied and fixed `Logger.GetAssemblyFilePath` in our code base - refactored it so it was easy to test).

With the RTM release, I'm happy if I could remove the work around in our code. Thanks!

PS: About the unit tests, So I wrote a fix, and it also includes some unit tests. Would be nice to contribute those tests to WinSCP.

Reply with quote

martin
Site Admin
martin avatar

Julian304 wrote:

PS: About the unit tests, So I wrote a fix, and it also includes some unit tests. Would be nice to contribute those tests to WinSCP.
Can you email me the tests?

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum