Skip to content

Commit

Permalink
Merge pull request #92 from kek444/access_network_share_storage
Browse files Browse the repository at this point in the history
enable UNC network paths (\\)
  • Loading branch information
FenPhoenix authored Jun 20, 2022
2 parents 6fa266b + 636b026 commit b148ba6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion AngelLoader/Common/Native/FastIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ private static List<string> GetFilesTopOnlyInternal(
//const int ERROR_REM_NOT_LIST = 0x33;
//const int ERROR_BAD_NETPATH = 0x35;

using var findHandle = FindFirstFileExW(@"\\?\" + path + "\\" + searchPattern,
string searchPath = (path.StartsWith(@"\\") ? @"\\?\UNC\" + path.Substring(2) : @"\\?\" + path) + "\\" + searchPattern;

using var findHandle = FindFirstFileExW(searchPath,
FINDEX_INFO_LEVELS.FindExInfoBasic, out WIN32_FIND_DATAW findData,
FINDEX_SEARCH_OPS.FindExSearchNameMatch, IntPtr.Zero, FIND_FIRST_EX_LARGE_FETCH);

Expand Down

0 comments on commit b148ba6

Please sign in to comment.