Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Property FileSystemEntryInfo.AlternateFileName is always an empty string. #286

Closed
Yomodo opened this issue Oct 28, 2016 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@Yomodo
Copy link
Collaborator

Yomodo commented Oct 28, 2016

The methods EnumerateFileSystemEntryInfosCore() and GetFileSystemEntryInfoCore() use, by default, the DirectoryEnumerationOptions.BasicSearch option.

Using this option improves retrieving file system objects by not querying the short file name.

This means that the results from these methods with a return type of FileSystemEntryInfo will always have an empty string for the short name.

The fix is easy: Remove the DirectoryEnumerationOptions.BasicSearch option as default from these methods.

However, I think this should be a breaking change, since the enumeration performance can be effected. To prevent this possible impact on performance, one has to add the DirectoryEnumerationOptions.BasicSearch option to their code.

@alphaleonis
Copy link
Owner

It would be a breaking change if we went the other way. Not sure I'd see it as a breaking change in this case, since no-one likely relies on the fact the AlternateFileName is empty. So I wouldn't say it's a breaking change since no-one will have to change their source-code to have it compile or to have the same behavior as before, even though the speed may be slightly affected of course. But I'm guessing the reason is you think it should be done in develop rather than master? Which sounds fine to me.

Aslo, the title should probably read FileSystemEntryInfo.AlternateFileName since this is what is publically exposed?

@Yomodo Yomodo changed the title Property WIN32_FIND_DATA.cAlternateFileName is always an empty string. Property FileSystemEntryInfo.AlternateFileName is always an empty string. Oct 29, 2016
@Yomodo Yomodo removed the Breaking label Oct 29, 2016
@Yomodo
Copy link
Collaborator Author

Yomodo commented Oct 29, 2016

Yeah you're right, not a breaking change and, of course, for the develop branch.

@Yomodo
Copy link
Collaborator Author

Yomodo commented May 30, 2017

Will leave it as-is for now. I really doubt if anyone will use the AlternateFileName property nowadays.

@Yomodo Yomodo closed this as completed May 30, 2017
@Yomodo
Copy link
Collaborator Author

Yomodo commented Jun 28, 2017

Commit 04976c4 fixes this.

@Yomodo Yomodo removed the Won't Fix label Jun 28, 2017
@Yomodo Yomodo self-assigned this Jun 28, 2017
@Yomodo Yomodo added this to the vNext milestone Jun 28, 2017
@Yomodo Yomodo modified the milestones: vNext, Release 2.2 Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants