New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alphaleonis.Win32.Network.Host.GetShareInfo doesn't work since 2.1.0 #289
Comments
You are 100% sure the share exists? |
@Yomodo The shares have been in format "\server\name". |
yup i can confirm that... GetShareInfo( |
It would appear that in the GetShareInfo() function overloads with the single string for uncPath, that the uncPath is first processed as: var unc = GetHostShareFromPath(uncPath); This function appears to return the host portion (unc[0]) correctly, but the share path portion (unc[1]) returns with a leading backslash. At this point, it would appear that the leading backslash is correct in the return from GetHostShareFromPath() via the code comments / documentation, however, in looking at older versions of this function it looks like it did not return a leading backslash? This may have changed for Fix #132 with commit 2d5a25b ? I can reproduce this issue and subsequent "fix" fairly easily in something like LinqPad, for example: Broken call (similar to what is in the code today): Working call: Anyway, without knowing where to make the appropriate change, and being new to GitHub pull requests, I'm posting a possible solution here. Hope this helps! |
While the mehtod workes great in 2.0.1, after Upgrade using just 2 params
Host.GetShareInfo Method (String, Boolean),
in 2.1.0 and newer versions I got an Invalid Share Error
System.Net.NetworkInformation.NetworkInformationException (0x80004005): Diese fr
eigegebene Ressource existiert nicht
bei Alphaleonis.Win32.Network.Host.GetShareInfoCore(ShareInfoLevel shareLevel
, String host, String share, Boolean continueOnException) in D:\Coding\Projects
GitHub\AlphaFS\AlphaFS\Network\Host Class\ServerMessageBlock.cs:Zeile 383.
bei Alphaleonis.Win32.Network.Host.GetShareInfo(String uncPath, Boolean conti
nueOnException) in D:\Coding\Projects\GitHub\AlphaFS\AlphaFS\Network\Host Class
ServerMessageBlock.cs:Zeile 172.
I hope you can help me.
Greetings
The text was updated successfully, but these errors were encountered: