Exclude "System Volume Information" explicitly from directory listing #15833
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Okay, bear with me for a moment. It is not as bad of a hack as it looks like, though I can understand if this gets rejected.
I started investigating #15831 and found out that there is no straightforward way to get the hidden attribute of FAT file systems on non-Windows systems. (I would say specifically for PS2 in the current SDK there is no way, since it instructs to use stat() that does not transfer this attribute).
But even a non-Windows RA install can meet such entry if an USB drive is used under Windows and then loaded to RA, such as transferring ROMs to an embedded system: a directory called "System Volume Information" will appear in the root. IMO it makes sense to treat this special entry as a hidden one. A few lines earlier, entries starting with dot are also excluded without regard to platform, although they do not hold special meaning under Windows.
Note: RA compiled for Windows excludes actual hidden entries elsewhere (in retro_vfs_opendir_impl() ).
Related Issues
#15831
Related Pull Requests
#14724 has brought a change in behavior on PS2, but it was also wrong earlier, just in a different way, so this is no reason to revert that (and it fixes a lot of other things). Current PS2 RA behavior is consistent with a desktop Linux RA install.