xoofx / zio

A cross-platform abstract/virtual filesystem framework with many built-ins filesystems for .NET
BSD 2-Clause "Simplified" License
817 stars 61 forks source link

Special case for SearchPattern on Windows isn't valid #10

Closed Rohansi closed 6 years ago

Rohansi commented 6 years ago

Six tests fail on my machine at this line: https://github.com/xoofx/zio/blob/d15df761d97e0a0c53457b7469d5e73610cd7704/src/Zio.Tests/FileSystems/TestFileSystemBase.cs#L323

other.AllFiles_txt does not contain any of the files with an extension beginning with "txt". Perhaps this behavior was removed from Windows?

Windows 10 version 1709, build 16299.98

Rohansi commented 6 years ago

For clarification, the special case is for search patterns with a three character extension. The results should include any files with an extension starting with those three characters but on my Windows it does not.

Rohansi commented 6 years ago

This behavior is only for filesystems with 8.3 names enabled. Can check with fsutil behavior query disable8dot3 C: in command prompt running as admin.

I think this special case should be removed and filter twice (once by Windows, once in Zio) so we get consistent results.

xoofx commented 6 years ago

I think this special case should be removed and filter twice (once by Windows, once in Zio) so we get consistent results.

If the OS/API has a different behavior based on a machine wide settings, that's likely the right way to fix this...