Skip to content

readdir sorting implicitly changed on Windows #633

Closed as not planned
Closed as not planned
@ajafff

Description

@ajafff

While working on #632 I noticed that my tests for sorting of readdir results didn't work as expected.
Turns out that's because I'm developing on Windows.

The exception for Windows was added in/because of #37

Regarding case-sensitivity there was a similar discussion in #533 (comment):

the default behavior would be to use system settings

I'm not sure if memfs should "magically" change the way it handles paths; I would prefer it is set explicitly.

Based on that, I'd like to revisit the decision made in #37.

I propose to add an option to Volume to enable/disable sorting of readdir results. To make this a non-breaking change, the default value for that option could depend on the platform just like it currently does. But it makes it easier to change the behavior without messing with process.platform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions