Skip to content

Commit

Permalink
enable UNC network paths (\\)
Browse files Browse the repository at this point in the history
  • Loading branch information
kek444 committed Jun 20, 2022
1 parent 6fa266b commit 636b026
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 636b026

Please sign in to comment.