mirror of https://github.com/dahall/Vanara.git
Fixed incorrect buffer length in GetUNCServer (#78)
parent
1ee34f1001
commit
4096345176
|
@ -182,7 +182,7 @@ namespace Vanara.IO
|
|||
/// </summary>
|
||||
/// <param name="path">The UNC path.</param>
|
||||
/// <returns>On success, the server portion of the UNC path. On failure, <see langword="null"/> is returned.</returns>
|
||||
public static string GetUNCServer(string path) => PathIsUNCEx(path, out var ptr) ? StringHelper.GetString(ptr, System.Runtime.InteropServices.CharSet.Unicode, path.Length) : null;
|
||||
public static string GetUNCServer(string path) => PathIsUNCEx(path, out var ptr) ? StringHelper.GetString(ptr, System.Runtime.InteropServices.CharSet.Unicode, (path.Length + 1) * 2) : null;
|
||||
|
||||
/// <summary>
|
||||
/// Searches a path to determine if it contains a valid prefix of the type passed by <paramref name="prefix"/>. A prefix is one of
|
||||
|
|
Loading…
Reference in New Issue