You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
Call Directory.EnumerateFileSystemEntryInfos for the parent directory
The " "-directory will not be enumerated correctly.
The bug is located in the method "private T NewFileSystemEntryType(bool isFolder, NativeMethods.WIN32_FIND_DATA win32FindData, string fileName, string pathLp)", where the behaviour is explicitely programmed - for an unkown reason:
var fullPathLp = (IsRelativePath ? OriginalInputPath + Path.DirectorySeparator : pathLp) + (!Utils.IsNullOrWhiteSpace(fileName) ? fileName : string.Empty);
I know, that a directory " " is somewhat named illegal, but you can create one with AlphaFS easily. Maybe, this wrong handling is programmed in other methods too (e.g. in File.CreateFileCore). I would appreciate a solution of this issue.
The text was updated successfully, but these errors were encountered:
As far as I can test at the moment, as a temp alternative, this works OK: var fullPathLp = (IsRelativePath ? OriginalInputPath + Path.DirectorySeparator : pathLp) + fileName;
Yomodo
changed the title
Directory.EnumerateFileSystemEntryInfos returns enumerated directory as subdirectory for subdirectories with spaces as name
Directory.EnumerateFileSystemEntryInfos does not return subdirectories with spaces as name.
Jan 5, 2018
Test:
The " "-directory will not be enumerated correctly.
The bug is located in the method "private T NewFileSystemEntryType(bool isFolder, NativeMethods.WIN32_FIND_DATA win32FindData, string fileName, string pathLp)", where the behaviour is explicitely programmed - for an unkown reason:
var fullPathLp = (IsRelativePath ? OriginalInputPath + Path.DirectorySeparator : pathLp) + (!Utils.IsNullOrWhiteSpace(fileName) ? fileName : string.Empty);
I know, that a directory " " is somewhat named illegal, but you can create one with AlphaFS easily. Maybe, this wrong handling is programmed in other methods too (e.g. in File.CreateFileCore). I would appreciate a solution of this issue.
The text was updated successfully, but these errors were encountered: