mirror of https://github.com/jellyfin/jellyfin.git
fix network enumeration
This commit is contained in:
parent
a178f74456
commit
1aede748b3
|
@ -29,6 +29,7 @@ namespace MediaBrowser.ServerApplication.Networking
|
||||||
/// <returns>IEnumerable{NetworkShare}.</returns>
|
/// <returns>IEnumerable{NetworkShare}.</returns>
|
||||||
public IEnumerable<NetworkShare> GetNetworkShares(string path)
|
public IEnumerable<NetworkShare> GetNetworkShares(string path)
|
||||||
{
|
{
|
||||||
|
Logger.Info("Getting network shares from {0}", path);
|
||||||
return new ShareCollection(path).OfType<Share>().Select(ToNetworkShare);
|
return new ShareCollection(path).OfType<Share>().Select(ToNetworkShare);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -390,7 +390,9 @@ namespace MediaBrowser.ServerApplication.Networking
|
||||||
Type t = (2 == level) ? typeof(SHARE_INFO_2) : typeof(SHARE_INFO_1);
|
Type t = (2 == level) ? typeof(SHARE_INFO_2) : typeof(SHARE_INFO_1);
|
||||||
int offset = Marshal.SizeOf(t);
|
int offset = Marshal.SizeOf(t);
|
||||||
|
|
||||||
for (int i = 0, lpItem = pBuffer.ToInt32(); i < entriesRead; i++, lpItem += offset)
|
var lpItem = pBuffer.ToInt64();
|
||||||
|
|
||||||
|
for (int i = 0; i < entriesRead; i++, lpItem += offset)
|
||||||
{
|
{
|
||||||
IntPtr pItem = new IntPtr(lpItem);
|
IntPtr pItem = new IntPtr(lpItem);
|
||||||
if (1 == level)
|
if (1 == level)
|
||||||
|
|
Loading…
Reference in New Issue